wok-next annotate gettext/receipt @ rev 20473

Tiny edits...
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Mar 10 16:57:21 2018 +0200 (2018-03-10)
parents 4396aed7eb01
children 2d4ad53f3c69
rev   line source
al@19743 1 # SliTaz package receipt v2.
pankso@29 2
pankso@29 3 PACKAGE="gettext"
al@19561 4 VERSION="0.19.8.1"
pankso@204 5 CATEGORY="development"
al@19743 6 SHORT_DESC="Utilities for the GNU Translation Project"
pankso@29 7 MAINTAINER="pankso@slitaz.org"
al@14903 8 LICENSE="GPL3"
al@19561 9 WEB_SITE="https://www.gnu.org/software/gettext/"
al@20436 10 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/gettext.html"
al@19561 11
al@19561 12 TARBALL="$PACKAGE-$VERSION.tar.xz"
pankso@29 13 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pankso@29 14
al@20436 15 BUILD_DEPENDS_arm="attr-dev ncurses-dev libxml2-tools libxml2-dev"
al@20473 16 BUILD_DEPENDS="libcroco-dev libxml2-dev glib-dev acl-dev emacs \
al@20473 17 xorg-libXrandr-dev"
al@20464 18 SPLIT="gettext-base gettext-tools emacs-pkg-po-mode gettext"
pankso@12147 19
al@20436 20 compile_rules() {
al@20436 21 case "$ARCH" in
al@20436 22 arm) ARCH_ARGS="--disable-acl";;
al@20436 23 esac
gokhlayeh@8184 24
al@20436 25 fix ld
al@20436 26 ./configure $CONFIGURE_ARGS $ARCH_ARGS && make && make install || return 1
al@20436 27
al@20436 28 chmod 0755 $install/usr/lib/preloadable_libintl.so
al@19743 29
al@19743 30 # stripped gettext.sh
al@19743 31 rm $install/usr/bin/gettext.sh
al@19743 32 install -m755 $stuff/gettext.sh $install/usr/bin
al@20464 33
al@20464 34 # emacs-pkg-po-mode --------
al@20464 35
al@20464 36 site_lisp="$install/usr/share/emacs/site-lisp"
al@20464 37 # Installing start file
al@20464 38 mkdir -p $site_lisp/site-start.d
al@20464 39 cp -a $src/gettext-tools/misc/start-po.el $site_lisp/site-start.d/50-start-po.el
al@20464 40
al@20464 41 # Installing po-mode
al@20464 42 mkdir -p $site_lisp/po-mode
al@20464 43 cp -a $src/gettext-tools/misc/po*.el $site_lisp/po-mode
al@20464 44
al@20464 45 # byte-compile files, remove src
al@20464 46 for file in $site_lisp/po-mode/*.el; do
al@20464 47 echo -n "Byte-compiling $(basename $file)"
al@20464 48 emacs -batch -f batch-byte-compile $file 2>/dev/null; err=$?
al@20464 49 status
al@20464 50 [ "$err" -eq 0 ] && rm -f $file
al@20464 51 done
al@19743 52 }
al@19743 53
al@19743 54 # Just to be sure when cross compiling, gettext is part of base system.
al@20436 55 testsuite() {
al@19743 56 readelf -h $install/usr/bin/gettext
pankso@29 57 }
pankso@29 58
al@20436 59 genpkg_rules() {
al@19743 60 case $PACKAGE in
al@19743 61 gettext-base)
al@19743 62 copy gettext gettext.sh envsubst ngettext
al@19743 63 CAT="base-system|base tools"
al@19743 64 DEPENDS="glibc-base"
al@19743 65 ;;
al@19743 66 gettext-tools)
al@19743 67 copy msgcat msgfmt msgmerge xgettext \
al@19743 68 libgettextlib*.so* libgettextsrc*.so*
al@19743 69 CAT="libs|tools"
al@20436 70 DEPENDS="acl attr glib libcroco libgomp liblzma libxml2 ncurses \
al@20436 71 pcre zlib"
al@19743 72 ;;
al@20464 73 emacs-pkg-po-mode)
al@20464 74 copy emacs/
al@20464 75 DEPENDS="emacs"
al@20464 76 CAT="development|Emacs major mode for editing or modifying PO files"
al@20464 77 ;;
al@20199 78 gettext)
al@20199 79 copy @std @dev @rm
al@20436 80 rm -rf $fs/usr/share/doc/ # @dev files here
al@20199 81 # Runtime depends, then dev-depends
al@20199 82 DEPENDS="gettext-base gettext-tools libcroco liblzma libxml2 \
al@20199 83 acl-dev attr-dev libcroco-dev libxml2-dev glib-dev pcre-dev m4"
al@20436 84 TAGS="LFS"
al@20199 85 ;;
al@19743 86 esac
pankso@12147 87 }
al@20464 88
al@20464 89 post_install_emacs_pkg_po_mode() {
al@20464 90 chroot "$1/" tazpkg reconfigure emacs
al@20464 91 }
al@20464 92
al@20464 93 post_remove_emacs_pkg_po_mode() {
al@20464 94 chroot "$1/" tazpkg reconfigure emacs
al@20464 95 }