wok-current annotate xtel/receipt @ rev 24970

created recipe for midori-lang
author Hans-G?nter Theisgen
date Tue Apr 26 14:49:30 2022 +0100 (2022-04-26)
parents 8ccb9346661c
children 2a1d69e69015
rev   line source
pascal@11204 1 # SliTaz package receipt.
pascal@11204 2
pascal@11204 3 PACKAGE="xtel"
pascal@11204 4 VERSION="3.3.0"
pascal@11204 5 CATEGORY="network"
Hans-G?nter@22347 6 TAGS="emulator minitel"
pascal@11204 7 SHORT_DESC="X emulator of the French Minitel."
pascal@11204 8 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15001 9 LICENSE="GPL2"
Hans-G?nter@22347 10 WEB_SITE="http://pficheux.free.fr/xtel/"
Hans-G?nter@22347 11
pascal@11204 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@11204 13 WGET_URL="${WEB_SITE}download/$TARBALL"
Hans-G?nter@22347 14
Hans-G?nter@22347 15 DEPENDS="jpeg ncurses-extra xorg xorg-libXp"
Hans-G?nter@22347 16 BUILD_DEPENDS="jpeg-dev xorg-bdftopcf xorg-cf-files xorg-gccmakedep
Hans-G?nter@22347 17 xorg-imake xorg-libXp xorg-mkfontdir xorg-mkfontscale xorg-xbitmaps"
Hans-G?nter@22347 18
pascal@11204 19 CONFIG_FILES="/etc/xtel"
pascal@11204 20
pascal@24055 21 current_version()
pascal@24055 22 {
pascal@24055 23 wget -O - $WEB_SITE/tele.html 2>/dev/null | \
pascal@24055 24 sed "/$PACKAGE/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|;q"
pascal@24055 25 }
pascal@24055 26
pascal@11204 27 # Rules to configure and make the package.
pascal@11204 28 compile_rules()
pascal@11204 29 {
pascal@11204 30 sed -i 's/sys_errlist.errno./strerror(errno)/' procedure.c teleinfo.c \
pascal@11204 31 mdmdetect.c xteld.c Xsra/SelFile.c
Hans-G?nter@22347 32 sed -i 's/sys_errlist.code_erreur./strerror(code_erreur)/' \
Hans-G?nter@22347 33 xaw.c xm.c
Hans-G?nter@22347 34 sed -i '/sys_nerr;/d;s/errno <= sys_nerr/1/' \
Hans-G?nter@22347 35 Xsra/SelFile.c
Hans-G?nter@22347 36 sed -i 's/getwd.SFstartDir/getcwd(SFstartDir, MAXPATHLEN/' \
Hans-G?nter@22347 37 Xsra/SelFile.c
pascal@11204 38 sed -i 's/, \(\$(...DIR)\)/,\1/;s/install_iminitel$/true/' \
pascal@11204 39 Imakefile */Imakefile
pascal@11204 40 xmkmf &&
pascal@11204 41 make -j 1 Xtel &&
pascal@11204 42 make all &&
pascal@11204 43 make DESTDIR=$DESTDIR install
pascal@11204 44 }
pascal@11204 45
pascal@11204 46 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@11204 47 genpkg_rules()
pascal@11204 48 {
Hans-G?nter@22347 49 mkdir -p $fs/usr/share/fonts/X11/xtel
Hans-G?nter@22347 50
Hans-G?nter@22347 51 cp -a $install/* $fs/
Hans-G?nter@22347 52 mv $fs/usr/lib/X11/xtel $fs/etc
pascal@11204 53 ln -s /etc/xtel $fs/usr/lib/X11
Hans-G?nter@22347 54 sed -i 's/`host/`nslookup/;s|/bin/bash|/bin/sh|' \
Hans-G?nter@22347 55 $fs/etc/ppp/ip*.iminitel
Hans-G?nter@22347 56 sed -i 's|X11R6/||' \
Hans-G?nter@22347 57 $fs/usr/bin/make_xtel_lignes
Hans-G?nter@22347 58 mv $fs/fonts/X11/xtel/* $fs/usr/share/fonts/X11/xtel
pascal@11204 59 }
pascal@11204 60
pascal@11204 61 # Pre and post install commands for Tazpkg.
pascal@11204 62 post_install()
pascal@11204 63 {
pascal@18730 64 grep -qs ^xtel "$1/etc/services" || cat >> "$1/etc/services" <<EOT
pascal@11204 65 xtel 1313/tcp # French minitel
pascal@11204 66 EOT
Hans-G?nter@22347 67
pascal@18730 68 grep -qs ^xtel "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT
pascal@11204 69 xtel stream tcp nowait root /usr/bin/xteld xteld
pascal@11204 70 EOT
Hans-G?nter@22347 71
pascal@11204 72 chroot "$1/" /usr/bin/install_iminitel
Hans-G?nter@22347 73 if [ -z "$1" ]
Hans-G?nter@22347 74 then
pascal@11204 75 /etc/init.d/inetd stop
pascal@11204 76 /etc/init.d/inetd start
pascal@11204 77 fi
Hans-G?nter@22347 78
pascal@11204 79 cat <<EOT
pascal@11204 80
pascal@11204 81 You should launch /usr/bin/make_xtel_lignes now.
pascal@11204 82
pascal@11204 83 EOT
pascal@11204 84 }