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