milis/talimatname/genel/python3/talimat

69 lines
2.0 KiB
Plaintext

# Description: Next generation of the python high-level scripting language
# URL: http://www.python.org
# Packager: alienus at nutyx dot org, tnut at nutyx dot org
# Depends on: sqlite expat
name=python3
version=3.5.1
release=1
source=(
http://www.python.org/ftp/python/$version/Python-$version.tar.xz
python3.png)
docversion=3.5.0a3
build() {
cd Python-$version
./configure --prefix=/usr \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--without-ensurepip
make
make DESTDIR=$PKG install
chmod -v 755 $PKG/usr/lib/libpython3.5m.so
chmod -v 755 $PKG//usr/lib/libpython3.so
# Install all HTML Docs files with desktop menu integration
install -v -dm755 $PKG/usr/share/doc/$name-$docversion/html
cd $SRC
wget --no-check-certificate -c https://www.python.org/ftp/python/doc/${docversion:0:5}/python-${docversion}-docs-html.tar.bz2
tar --strip-components=1 \
--no-same-owner \
--no-same-permissions \
-C $PKG/usr/share/doc/$name-$docversion/html \
-xvf python-$docversion-docs-html.tar.bz2
find $PKG/usr/share/doc/$name-$docversion -type d -exec chmod 0755 {} \;
find $PKG/usr/share/doc/$name-$docversion -type f -exec chmod 0644 {} \;
mkdir -p $PKG/usr/share/applications
echo "[Desktop Entry]
Categories=Development;Documentation
Exec=xdg-open file:///usr/share/doc/python3-$docversion/html/index.html
Icon=python3
StartupNotify=false
Terminal=false
Type=Application
Name=Python 3 Documentation
Name[fr]=Documentation Python 3" > $PKG/usr/share/applications/python3.desktop
install -Dm644 $SRC/$name.png \
$PKG/usr/share/icons/hicolor/48x48/apps/$name.png
}
doc () {
cd $PKG
bsdtar -cf \
bsdtar -cf \
$PKGMK_PACKAGE_DIR/$name.doc#$version-any.mps \
usr/share/doc/$name-$docversion \
usr/share/applications/$name.desktop \
usr/share/icons/hicolor/48x48/apps/$name.png
rm -r usr/share/{doc,applications/$name.desktop,icons/hicolor/48x48/apps/$name.png}
}