# SliTaz package receipt. PACKAGE="p2c" VERSION="1.21alpha2" CATEGORY="development" SHORT_DESC="A Pascal to C translator." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="GPL2" TARBALL="$PACKAGE-$VERSION.tar.gz" WEB_SITE="http://users.fred.net/tds/lab/p2c/" WGET_URL="http://users.fred.net/tds/lab/p2c/archive/$TARBALL" TAGS="pascal" DEPENDS="perl" current_version() { wget -O - $WEB_SITE 2>/dev/null | \ sed "/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|;q" } # Rules to configure and make the package. compile_rules() { cd $src/src sed -i -e 's|^HOMEDIR.*|HOMEDIR=/usr/lib/p2c|' \ -e 's|^INCDIR.*|INCDIR=/usr/include/p2c|' \ -e 's|^BINDIR.*|BINDIR=/usr/bin|' \ -e 's|^LIBDIR.*|LIBDIR=/usr/lib|' \ -e 's|^ABSHOMEDIR.*|ABSHOMEDIR=/usr/lib/p2c|' \ -e 's|^ABSINCDIR.*|ABSINCDIR=/usr/include/p2c|' \ -e 's|^ABSLIBDIR.*|ABSLIBDIR=/usr/lib|' \ Makefile grep -q getlinep2c lex.c || sed -i 's/getline/getlinep2c/' * make all p2cc mkdir -p $DESTDIR/usr/lib/p2c $DESTDIR/usr/include/p2c $DESTDIR/usr/bin cp p2c p2cc $DESTDIR/usr/bin cp libp2c.a $DESTDIR/usr/lib ranlib $DESTDIR/usr/lib/libp2c.a cp p2c.h $DESTDIR/usr/include/p2c cp sys.p2crc loc.p2crc system.imp system.m2 turbo.imp string.pas \ $DESTDIR/usr/lib/p2c mv $DESTDIR/usr/lib/p2c/sys.p2crc $DESTDIR/usr/lib/p2c/p2crc } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { cp -a $install/* $fs }