wok-next view gettext/receipt @ rev 21303
updated gujin (2.8.6 -> 2.8.7)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Dec 10 07:57:29 2019 +0100 (2019-12-10) |
parents | 7b8e80e44f01 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="gettext"
4 VERSION="0.19.8.1"
5 CATEGORY="development"
6 SHORT_DESC="Utilities for the GNU Translation Project"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://www.gnu.org/software/gettext/"
10 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/gettext.html"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
15 BUILD_DEPENDS="libcroco-dev libxml2-dev glib-dev acl-dev emacs \
16 libxrandr-dev libxfixes-dev"
17 SPLIT="$PACKAGE-base $PACKAGE emacs-pkg-po-mode $PACKAGE-dev"
19 compile_rules() {
20 ./configure $CONFIGURE_ARGS &&
21 make &&
22 make install || return 1
24 chmod 0755 $install/usr/lib/preloadable_libintl.so
26 # stripped gettext.sh
27 rm $install/usr/bin/gettext.sh
28 install -m755 $stuff/gettext.sh $install/usr/bin
30 # emacs-pkg-po-mode --------
32 site_lisp="$install/usr/share/emacs/site-lisp"
33 # Installing start file
34 mkdir -p $site_lisp/site-start.d
35 cp -a $src/gettext-tools/misc/start-po.el $site_lisp/site-start.d/50-start-po.el
37 # Installing po-mode
38 mkdir -p $site_lisp/po-mode
39 cp -a $src/gettext-tools/misc/po*.el $site_lisp/po-mode
41 # byte-compile files, remove src
42 for file in $site_lisp/po-mode/*.el; do
43 echo -n "Byte-compiling $(basename $file)"
44 emacs -batch -f batch-byte-compile $file 2>/dev/null; err=$?
45 status
46 [ "$err" -eq 0 ] && rm -f $file
47 done
48 }
50 # Just to be sure when cross compiling, gettext is part of base system.
51 testsuite() {
52 readelf -h $install/usr/bin/gettext
53 }
55 genpkg_rules() {
56 case $PACKAGE in
57 gettext-base)
58 copy gettext gettext.sh envsubst ngettext
59 CAT="base-system|base tools"
60 DEPENDS="glibc-base"
61 ;;
62 gettext)
63 copy msgcat msgfmt msgmerge xgettext \
64 libgettextlib*.so* libgettextsrc*.so*
65 DEPENDS="acl glib libcroco libgomp libxml2 ncurses"
66 TAGS="LFS"
67 ;;
68 emacs-pkg-po-mode)
69 copy emacs/
70 DEPENDS="emacs"
71 CAT="development|Emacs major mode for editing or modifying PO files"
72 ;;
73 *-dev)
74 copy @std @dev @rm
75 rm -rf $fs/usr/share/doc/ # @dev files here
76 # Runtime depends, then dev-depends
77 DEPENDS="gettext-base gettext libxml2"
78 ;;
79 esac
80 }
82 post_install_emacs_pkg_po_mode() {
83 chroot "$1/" tazpkg reconfigure emacs
84 }
86 post_remove_emacs_pkg_po_mode() {
87 chroot "$1/" tazpkg reconfigure emacs
88 }