wok-6.x annotate p2c/receipt @ rev 24352

babl-dev: update deps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Feb 03 10:29:52 2022 +0000 (2022-02-03)
parents c49ffc024a6c
children d765616e1f3d
rev   line source
pascal@4393 1 # SliTaz package receipt.
pascal@4393 2
pascal@4393 3 PACKAGE="p2c"
pascal@4393 4 VERSION="1.21alpha2"
pascal@4393 5 CATEGORY="development"
pascal@4393 6 SHORT_DESC="A Pascal to C translator."
pascal@4393 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15375 8 LICENSE="GPL2"
pascal@13036 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@20689 10 WEB_SITE="http://users.fred.net/tds/lab/p2c/"
pascal@13035 11 WGET_URL="http://darkstar.ist.utl.pt/slackware/slackware_source/d/p2c/$TARBALL"
pascal@15375 12 TAGS="pascal"
pascal@15375 13
pascal@4393 14 DEPENDS="perl"
pascal@4393 15
pascal@24130 16 current_version()
pascal@24130 17 {
pascal@24130 18 wget -O - $WEB_SITE 2>/dev/null | \
pascal@24130 19 sed "/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|;q"
pascal@24130 20 }
pascal@24130 21
pascal@4393 22 # Rules to configure and make the package.
pascal@4393 23 compile_rules()
pascal@4393 24 {
pascal@4393 25 cd $src/src
pascal@4393 26 sed -i -e 's|^HOMEDIR.*|HOMEDIR=/usr/lib/p2c|' \
pascal@4393 27 -e 's|^INCDIR.*|INCDIR=/usr/include/p2c|' \
pascal@4393 28 -e 's|^BINDIR.*|BINDIR=/usr/bin|' \
pascal@4393 29 -e 's|^LIBDIR.*|LIBDIR=/usr/lib|' \
pascal@4393 30 -e 's|^ABSHOMEDIR.*|ABSHOMEDIR=/usr/lib/p2c|' \
pascal@4393 31 -e 's|^ABSINCDIR.*|ABSINCDIR=/usr/include/p2c|' \
pascal@4393 32 -e 's|^ABSLIBDIR.*|ABSLIBDIR=/usr/lib|' \
pascal@4393 33 Makefile
pascal@4393 34 grep -q getlinep2c lex.c || sed -i 's/getline/getlinep2c/' *
pascal@4393 35 make all p2cc
pascal@15375 36 mkdir -p $DESTDIR/usr/lib/p2c $DESTDIR/usr/include/p2c $DESTDIR/usr/bin
pascal@15375 37 cp p2c p2cc $DESTDIR/usr/bin
pascal@15375 38 cp libp2c.a $DESTDIR/usr/lib
pascal@15375 39 ranlib $DESTDIR/usr/lib/libp2c.a
pascal@15375 40 cp p2c.h $DESTDIR/usr/include/p2c
pascal@4393 41 cp sys.p2crc loc.p2crc system.imp system.m2 turbo.imp string.pas \
pascal@15375 42 $DESTDIR/usr/lib/p2c
pascal@15375 43 mv $DESTDIR/usr/lib/p2c/sys.p2crc $DESTDIR/usr/lib/p2c/p2crc
pascal@4393 44 }
pascal@4393 45
pascal@4393 46 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@4393 47 genpkg_rules()
pascal@4393 48 {
pascal@15375 49 cp -a $install/* $fs
pascal@4393 50 }