mirror of
https://github.com/KeithDHedger/LFSPkgBuilds.git
synced 2026-01-27 08:04:20 +00:00
first commit to github
This commit is contained in:
62
LFSPkgBuildScripts/python/Python/Python.LFSBuild
Executable file
62
LFSPkgBuildScripts/python/Python/Python.LFSBuild
Executable file
@ -0,0 +1,62 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. /usr/share/LFSPkg/LFSFunctions
|
||||
|
||||
DEPENDS="expat-2.1.0 libffi-3.2.1 pkg-config-0.28"
|
||||
if ! lfspkg -B "$DEPENDS";then
|
||||
exit 100
|
||||
fi
|
||||
|
||||
PKGNAME="python"
|
||||
TARNAME="Python"
|
||||
VERSION="2.7.10"
|
||||
BUILD=${BUILD:-1}
|
||||
SECTION="PYTHON"
|
||||
SUFFIX="LFSPKG"
|
||||
TARBALL="${TARNAME}-${VERSION}.tar.xz"
|
||||
|
||||
gettar "http://www.python.org/ftp/python/${VERSION}/${TARBALL}" $SECTION
|
||||
gettar "http://docs.python.org/ftp/python/doc/${VERSION}/${PKGNAME}-${VERSION}-docs-html.tar.bz2" $SECTION
|
||||
|
||||
PKG="${OUTPUT}/${PKGNAME}"
|
||||
|
||||
DOWHAT=${1:-"build"}
|
||||
rm -rf "$PKG" || true
|
||||
mkdir -p "$PKG"
|
||||
tar -xvf "${SOURCEARCHIVES}/${SECTION}/${TARBALL}"
|
||||
|
||||
pushd "${TARNAME}-${VERSION}"
|
||||
./configure --prefix=/usr --enable-shared --with-system-expat --with-system-ffi --enable-unicode=ucs4 --libdir=/usr/lib --with-system-expat
|
||||
make $MAKEFLAGS||make|| exit 1
|
||||
make install DESTDIR=$PKG || exit 1
|
||||
chmod -v 755 $PKG/usr/lib/libpython2.7.so.1.0||true
|
||||
|
||||
install -v -dm755 $PKG/usr/share/doc/${PKGNAME}-${VERSION}
|
||||
tar --strip-components=1 -C $PKG/usr/share/doc/${PKGNAME}-${VERSION} --no-same-owner -xvf ${SOURCEARCHIVES}/${SECTION}/${PKGNAME}-${VERSION}-docs-html.tar.bz2
|
||||
find $PKG/usr/share/doc/${PKGNAME}-${VERSION} -type d -exec chmod 0755 {} \;
|
||||
find $PKG/usr/share/doc/${PKGNAME}-${VERSION} -type f -exec chmod 0644 {} \;
|
||||
popd
|
||||
|
||||
checketc $PKG
|
||||
packageclean "$PKG"
|
||||
|
||||
pushd "$PKG"
|
||||
/usr/bin/lfspkg -n "$PKGNAME" -p "$VERSION" -d $SECTION -b $BUILD -s $SUFFIX -m
|
||||
popd
|
||||
|
||||
case $DOWHAT in
|
||||
up*)
|
||||
lfspkg "^${PKGNAME}-[0-9][0-9]*" "${OUTPUT}/${SECTION}/${PKGNAME}-${VERSION}-${BUILD}_${SECTION}_${SUFFIX}.tar.gz" -u
|
||||
;;
|
||||
"install")
|
||||
lfspkg "${OUTPUT}/${SECTION}/${PKGNAME}-${VERSION}-${BUILD}_${SECTION}_${SUFFIX}.tar.gz" -i
|
||||
;;
|
||||
"build")
|
||||
echo "Just built"
|
||||
;;
|
||||
*)
|
||||
echo "*** Unknown command ***"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
rm -r "$PKG" "${TARNAME}-${VERSION}"
|
||||
Reference in New Issue
Block a user