wok-current annotate emacs/receipt @ rev 19731

emacs: fix genpkg_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Feb 17 11:39:45 2017 +0100 (2017-02-17)
parents 11ab1ba10fc3
children bb4d56bc361e
rev   line source
domcox@1046 1 # SliTaz package receipt.
domcox@1046 2
domcox@1046 3 PACKAGE="emacs"
domcox@14190 4 VERSION="24.3"
pascal@18559 5 CATEGORY="editors"
domcox@1046 6 SHORT_DESC="The GNU Emacs editor"
domcox@3938 7 MAINTAINER="domcox@slitaz.org"
pascal@14999 8 LICENSE="GPL3"
pascal@14999 9 SUGGESTED="alsa-lib"
pascal@14999 10 TARBALL="$PACKAGE-$VERSION.tar.xz"
pascal@14999 11 WEB_SITE="http://www.gnu.org/software/emacs/"
pascal@14999 12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pascal@14999 13 TAGS="text-editor"
pascal@14999 14
domcox@14082 15 DEPENDS="atk cairo dbus expat freetype fontconfig giflib glib gnutls gtk+ jpeg \
domcox@14082 16 libgio libpng librsvg util-linux-uuid ncurses pango tiff xorg-server zlib \
mojo@17765 17 librsvg libgsf libtinfo libgnutls harfbuzz"
domcox@14082 18 BUILD_DEPENDS="atk-dev cairo-dev expat-dev dbus-dev freetype-dev \
domcox@14082 19 fontconfig-dev giflib-dev glib-dev gnutls-dev gtk+-dev jpeg-dev libgio-dev \
domcox@14082 20 libpng-dev librsvg-dev ncurses-dev pango-dev pkg-config tiff-dev xorg-dev \
domcox@14082 21 xorg-dev-proto"
domcox@1046 22
domcox@1046 23 # Rules to configure and make the package.
domcox@1046 24 compile_rules()
domcox@1046 25 {
domcox@1046 26 # Gzip workaround in busybox
domcox@1900 27 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' Makefile.in
domcox@1900 28 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' leim/Makefile.in
pascal@5582 29 # Configure (with GCC 4.5.0 workaround)
pascal@5582 30 CFLAGS="-g -O2 -fno-optimize-sibling-calls" ./configure $CONFIGURE_ARGS \
slaxemulator@11722 31 --infodir=/usr/share/info \
domcox@3938 32 --mandir=/usr/share/man \
domcox@3938 33 --without-makeinfo \
domcox@7830 34 --without-gconf \
domcox@3938 35 --with-sound \
domcox@3938 36 --with-x \
domcox@3938 37 --with-toolkit-scroll-bars \
domcox@3938 38 --with-xpm=yes \
domcox@3938 39 --libexecdir=/usr/lib \
domcox@3938 40 --localstatedir=/var/lib \
domcox@3938 41 --sharedstatedir=/var/lib \
domcox@3938 42 --prefix=/usr && \
gokhlayeh@11574 43 make $MAKEFLAGS && \
slaxemulator@11722 44 make DESTDIR=$DESTDIR install
domcox@1046 45 }
domcox@1046 46
domcox@1046 47 # Rules to gen a SliTaz package suitable for Tazpkg.
domcox@1046 48 genpkg_rules()
domcox@1046 49 {
domcox@1046 50 # Binary files
domcox@14082 51 BIN_FILES="ctags ebrowse emacs-$VERSION emacsclient etags grep-changelog"
domcox@3938 52 echo -n "Copying emacs binary files"
domcox@3938 53 mkdir -p $fs/usr/bin && \
domcox@3938 54 for file in $BIN_FILES; do
pascal@14999 55 cp -a $install/usr/bin/$file $fs/usr/bin
domcox@3938 56 done
domcox@3938 57 status
domcox@3938 58 # Lib files
domcox@3938 59 echo -n "Copying emacs lib files"
pascal@14999 60 cp -a $install/usr/lib $fs/usr
domcox@3938 61 status
domcox@14082 62 strip -s $fs/usr/lib/$PACKAGE/$VERSION/i486-pc-linux-gnu/* 2> /dev/null
domcox@3938 63 # lisp files
domcox@14082 64 LISP_DIR="lisp lisp/calc lisp/calendar lisp/cedet lisp/cedet/ede \
domcox@14082 65 lisp/cedet/semantic lisp/cedet/semantic/analyze lisp/cedet/semantic/bovine \
domcox@14082 66 lisp/cedet/semantic/decorate lisp/cedet/semantic/symref lisp/cedet/srecode \
domcox@14082 67 lisp/cedet/semantic/wisent lisp/emacs-lisp lisp/emulation lisp/erc lisp/eshell \
domcox@14082 68 lisp/gnus lisp/international lisp/language lisp/mail lisp/mh-e lisp/net \
domcox@14082 69 lisp/nxml lisp/obsolete lisp/org lisp/play lisp/progmodes lisp/textmodes \
domcox@14082 70 lisp/url lisp/vc"
domcox@3938 71 for dir in $LISP_DIR; do
domcox@3938 72 echo -n "Copying $dir files"
domcox@14082 73 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \
pascal@14999 74 cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
domcox@14082 75 $fs/usr/share/$PACKAGE/$VERSION/$dir
pascal@14999 76 if [ $(ls $install/usr/share/$PACKAGE/$VERSION/$dir/ | \
domcox@14082 77 grep -c \.el$) -gt 0 ]; then
pascal@14999 78 cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/*.el \
domcox@14082 79 $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 80 fi
domcox@3938 81 for file in COPYING README TODO; do
pascal@14999 82 if [ -e $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
pascal@14999 83 cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/$file \
domcox@14082 84 $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 85 fi
domcox@3938 86 done
domcox@3938 87 status
domcox@3938 88 done
domcox@3938 89 # Use linux term only
domcox@14082 90 LINUX_TERM="README linux.e* rxvt.elc tty-colors.elc vt100.elc xterm.elc"
domcox@3938 91 echo -n "Copying lisp/term files (linux only)"
domcox@14082 92 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/lisp/term && \
domcox@3938 93 for file in $LINUX_TERM; do
pascal@14999 94 cp -a $install/usr/share/$PACKAGE/$VERSION/lisp/term/$file \
domcox@14082 95 $fs/usr/share/$PACKAGE/$VERSION/lisp/term
domcox@3938 96 done
domcox@3938 97 status
domcox@3938 98 # leim files
domcox@3938 99 echo -n "Copying leim files"
domcox@14082 100 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/leim && \
pascal@14999 101 cp -a $install/usr/share/$PACKAGE/$VERSION/leim/*.el \
domcox@14082 102 $fs/usr/share/$PACKAGE/$VERSION/leim
domcox@3938 103 status
domcox@3938 104 LEIM_FILES="leim/ja-dic leim/quail"
domcox@3938 105 for dir in $LEIM_FILES; do
domcox@3938 106 echo -n "Copying $dir files"
domcox@14082 107 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \
pascal@14999 108 cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
domcox@14082 109 $fs/usr/share/$PACKAGE/$VERSION/$dir && \
domcox@3938 110 for file in COPYING README TODO; do
pascal@14999 111 if [ -e $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
pascal@14999 112 cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/$file \
domcox@14082 113 $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 114 fi
domcox@3938 115 done
domcox@3938 116 status
domcox@3938 117 done
domcox@1046 118 # Conf files
domcox@3938 119 echo -n "Copying conf files"
domcox@14190 120 CONF_FILES="ETAGS.README charsets e enriched.doc edt-user.el forms \
domcox@14190 121 emacs-buffer.gdb gnus nxml org schema srecode ps-prin0.ps \
domcox@14082 122 ps-prin1.ps ses-example.ses spook.lines themes yow.lines"
domcox@14082 123 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc && \
domcox@3938 124 for file in $CONF_FILES; do
pascal@14999 125 cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$file \
domcox@14082 126 $fs/usr/share/$PACKAGE/$VERSION/etc
domcox@1046 127 done
domcox@3938 128 status
domcox@3938 129 # Pixmaps files
domcox@14082 130 XPM_DIR="images images/custom images/ezimage images/gnus images/gud \
domcox@14082 131 images/icons/allout-widgets/*-bg images/low-color images/mail images/mpc \
domcox@14082 132 images/newsticker images/smilies images/smilies/grayscale \
domcox@14082 133 images/smilies/medium images/tree-widget/default images/tree-widget/folder"
domcox@3938 134 for dir in $XPM_DIR; do
domcox@3939 135 echo -n "Copying $dir xpm files"
domcox@14082 136 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
pascal@14999 137 cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$dir/*.xpm \
domcox@14082 138 $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
domcox@3938 139 for file in COPYING README TODO; do
pascal@14999 140 if [ -e $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
pascal@14999 141 cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/$file \
domcox@14082 142 $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 143 fi
domcox@3938 144 done
domcox@3938 145 status
domcox@3938 146 done
pascal@19731 147 PNG_DIR="images images/gnus images/icons/allout-widgets/dark-bg \
pascal@19731 148 images/icons/allout-widgets/light-bg images/tree-widget/default \
pascal@19731 149 images/tree-widget/folder"
domcox@3939 150 for dir in $PNG_DIR; do
domcox@3939 151 echo -n "Copying $dir png files"
pascal@19731 152 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc/$dir 2> /dev/null || true
pascal@14999 153 cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$dir/*.png \
domcox@14082 154 $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
domcox@3939 155 status
domcox@3939 156 done
domcox@3938 157 # Licence
domcox@14082 158 GNU_FILES="AUTHORS CENSORSHIP COPYING DISTRIB FTP GNU ORDERS README \
domcox@14082 159 SERVICE copying.paper"
domcox@3938 160 echo -n "Copying License files"
domcox@3938 161 for file in $GNU_FILES; do
pascal@14999 162 cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$file \
domcox@14082 163 $fs/usr/share/$PACKAGE/$VERSION/etc
domcox@3938 164 done
domcox@3938 165 status
domcox@1046 166 # Install specific site file
domcox@3938 167 echo -n "Installing specific SliTaz file"
pascal@14999 168 cp -a $install/usr/share/$PACKAGE/$VERSION/site-lisp \
llevrel@18794 169 $fs/usr/share/$PACKAGE && \
domcox@3938 170 mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
llevrel@18794 171 cp -a $stuff/default.el $stuff/site-start.el \
llevrel@18794 172 $fs/usr/share/$PACKAGE/site-lisp && \
domcox@14082 173 cp -a $stuff/90-slitaz.el \
domcox@14082 174 $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
domcox@3938 175 status
domcox@3938 176 # Install desktop files for emacs
domcox@3938 177 echo -n "Installing emacs menu"
domcox@3938 178 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications && \
pascal@14999 179 cp -a $install/usr/share/applications $fs/usr/share/ && \
pascal@14999 180 cp -a $install/usr/share/icons/hicolor/32x32/apps/emacs.png \
domcox@14082 181 $fs/usr/share/pixmaps
domcox@3938 182 status
domcox@14082 183 # Use default site-lisp
domcox@14082 184 cd $fs/usr/share/$PACKAGE/$VERSION
domcox@1046 185 ln -s ../site-lisp site-lisp
domcox@1046 186 }
domcox@1380 187
domcox@3939 188 post_install()
domcox@3939 189 {
domcox@14082 190 # linking /usr/bin/emacs to new version
pascal@18730 191 [ -h "$1/usr/bin/emacs" ] && rm -f "$1/usr/bin/emacs"
pascal@18730 192 ln -s /usr/bin/emacs-$VERSION "$1/usr/bin/emacs"
domcox@3939 193 }
domcox@3939 194
domcox@1380 195 post_remove()
domcox@1380 196 {
pascal@18730 197 rm -rf "$1/usr/share/emacs"
pascal@18730 198 rm -rf "$1/usr/lib/emacs"
pascal@18730 199 rm -f "$1/usr/bin/emacs"
llevrel@18794 200 }