wok-next rev 20085
emacs: make receipt less complicated - all files are packaged now - fix it if something bad happens.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Oct 25 21:45:59 2017 +0300 (2017-10-25) |
parents | 073c7806c2a2 |
children | d85e4b3eb2b4 |
files | emacs/receipt |
line diff
1.1 --- a/emacs/receipt Wed Oct 25 13:00:12 2017 +0200 1.2 +++ b/emacs/receipt Wed Oct 25 21:45:59 2017 +0300 1.3 @@ -6,20 +6,20 @@ 1.4 SHORT_DESC="The GNU Emacs editor" 1.5 MAINTAINER="domcox@slitaz.org" 1.6 LICENSE="GPL3" 1.7 +WEB_SITE="http://www.gnu.org/software/emacs/" 1.8 + 1.9 TARBALL="$PACKAGE-$VERSION.tar.xz" 1.10 -WEB_SITE="http://www.gnu.org/software/emacs/" 1.11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL" 1.12 1.13 BUILD_DEPENDS="atk-dev cairo-dev expat-dev dbus-dev freetype-dev \ 1.14 fontconfig-dev glib-dev gnutls-dev gtk+-dev jpeg-dev \ 1.15 -libpng-dev librsvg-dev ncurses-dev pango-dev pkg-config tiff-dev xorg-dev \ 1.16 +libpng16-dev librsvg-dev ncurses-dev pango-dev pkg-config tiff-dev xorg-dev \ 1.17 xorg-dev-proto" # giflib-dev: version 4 needed, add --with-gif=no) 1.18 -SPLIT="emacs-help emacs-lisp-sources" 1.19 +SPLIT="emacs-help emacs-lisp-sources emacs" 1.20 1.21 # Rules to configure and make the package. 1.22 -compile_rules() 1.23 -{ 1.24 - ./configure $CONFIGURE_ARGS \ 1.25 +compile_rules() { 1.26 + ./configure \ 1.27 --infodir=/usr/share/info \ 1.28 --mandir=/usr/share/man \ 1.29 --without-makeinfo \ 1.30 @@ -32,206 +32,63 @@ 1.31 --libexecdir=/usr/lib \ 1.32 --localstatedir=/var/lib \ 1.33 --sharedstatedir=/var/lib \ 1.34 - --prefix=/usr && \ 1.35 - make $MAKEFLAGS && \ 1.36 - make DESTDIR=$DESTDIR install 1.37 + $CONFIGURE_ARGS && 1.38 + make $MAKEFLAGS && 1.39 + make DESTDIR=$DESTDIR install || return 1 1.40 + 1.41 + # Install specific site file 1.42 + mkdir -p $install/usr/share/emacs/site-lisp/site-start.d 1.43 + cp -a $stuff/default.el \ 1.44 + $stuff/site-start.el $install/usr/share/emacs/site-lisp/ 1.45 + cp -a $stuff/90-slitaz.el $install/usr/share/emacs/site-lisp/site-start.d 1.46 + 1.47 + # Use default site-lisp 1.48 + ln -s ../site-lisp $install/usr/share/emacs/$VERSION/site-lisp 1.49 + 1.50 + chown -R root:root $install 1.51 } 1.52 1.53 # Rules to gen a SliTaz package suitable for Tazpkg. 1.54 -genpkg_rules() 1.55 -{ 1.56 +genpkg_rules() { 1.57 case $PACKAGE in 1.58 - emacs) 1.59 - SUGGESTED="alsa-lib" 1.60 - TAGS="text-editor" 1.61 - DEPENDS="atk cairo dbus expat freetype fontconfig giflib glib \ 1.62 + emacs-help) 1.63 + copy \ 1.64 + info/ \ 1.65 + tutorials/ \ 1.66 + refcards/*.pdf \ 1.67 + etc/[A-Z]* \ 1.68 + etc/*.txt 1.69 + DEPENDS="emacs" 1.70 + CAT="development|help files" 1.71 + ;; 1.72 + emacs-lisp-sources) 1.73 + copy \ 1.74 + *.el.gz \ 1.75 + refcards/*.tex 1.76 + DEPENDS="emacs" 1.77 + CAT="development|Lisp source files" 1.78 + ;; 1.79 + emacs) 1.80 + copy @std @dev 1.81 + remove_already_packed 1.82 + strip -s $fs/usr/lib/emacs/$VERSION/i486-pc-linux-gnu/* 2>/dev/null 1.83 + DEPENDS="atk cairo dbus expat freetype fontconfig giflib glib \ 1.84 gnutls gtk+ jpeg libpng librsvg util-linux-uuid \ 1.85 ncurses pango tiff xorg-server zlib librsvg libgsf \ 1.86 libgnutls harfbuzz" 1.87 - # Binary files 1.88 - BIN_FILES="ctags ebrowse emacs-$VERSION emacsclient etags" 1.89 - echo -n "Copying emacs binary files" 1.90 - mkdir -p $fs/usr/bin && \ 1.91 - for file in $BIN_FILES; do 1.92 - cp -a $install/usr/bin/$file $fs/usr/bin 1.93 - done 1.94 - status 1.95 - # Lib files 1.96 - echo -n "Copying emacs lib files" 1.97 - cp -a $install/usr/lib $fs/usr 1.98 - status 1.99 - strip -s $fs/usr/lib/$PACKAGE/$VERSION/i486-pc-linux-gnu/* 2> /dev/null 1.100 - # lisp files 1.101 - LISP_DIR="lisp lisp/calc lisp/calendar lisp/cedet lisp/cedet/ede \ 1.102 -lisp/cedet/semantic lisp/cedet/semantic/analyze lisp/cedet/semantic/bovine \ 1.103 -lisp/cedet/semantic/decorate lisp/cedet/semantic/symref lisp/cedet/srecode \ 1.104 -lisp/cedet/semantic/wisent lisp/emacs-lisp lisp/emulation lisp/erc lisp/eshell \ 1.105 -lisp/gnus lisp/international lisp/language lisp/mail lisp/mh-e lisp/net \ 1.106 -lisp/nxml lisp/obsolete lisp/org lisp/play lisp/progmodes lisp/textmodes \ 1.107 -lisp/url lisp/vc" 1.108 - for dir in $LISP_DIR; do 1.109 - echo -n "Copying $dir files" 1.110 - mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \ 1.111 - cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/*.elc \ 1.112 - $fs/usr/share/$PACKAGE/$VERSION/$dir 1.113 - if [ $(ls $install/usr/share/$PACKAGE/$VERSION/$dir/ | \ 1.114 - grep -c \.el$) -gt 0 ]; then 1.115 - cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/*.el \ 1.116 - $fs/usr/share/$PACKAGE/$VERSION/$dir 1.117 - fi 1.118 - for file in COPYING README TODO; do 1.119 - if [ -e $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then 1.120 - cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/$file \ 1.121 - $fs/usr/share/$PACKAGE/$VERSION/$dir 1.122 - fi 1.123 - done 1.124 - status 1.125 - done 1.126 - # Use linux term only 1.127 - LINUX_TERM="README linux.e* rxvt.elc tty-colors.elc vt100.elc xterm.elc" 1.128 - echo -n "Copying lisp/term files (linux only)" 1.129 - mkdir -p $fs/usr/share/$PACKAGE/$VERSION/lisp/term && \ 1.130 - for file in $LINUX_TERM; do 1.131 - cp -a $install/usr/share/$PACKAGE/$VERSION/lisp/term/$file \ 1.132 - $fs/usr/share/$PACKAGE/$VERSION/lisp/term 1.133 - done 1.134 - status 1.135 - LEIM_FILES="leim/ja-dic leim/quail" 1.136 - for dir in $LEIM_FILES; do 1.137 - echo -n "Copying $dir files" 1.138 - mkdir -p $fs/usr/share/$PACKAGE/$VERSION/lisp/$dir && \ 1.139 - cp -a $install/usr/share/$PACKAGE/$VERSION/lisp/$dir/*.elc \ 1.140 - $fs/usr/share/$PACKAGE/$VERSION/lisp/$dir && \ 1.141 - status 1.142 - done 1.143 - # Conf files 1.144 - echo -n "Copying conf files" 1.145 - CONF_FILES="ETAGS.README charsets e enriched.txt edt-user.el forms \ 1.146 -emacs-buffer.gdb gnus nxml org schema srecode ps-prin0.ps \ 1.147 -ps-prin1.ps ses-example.ses spook.lines themes yow.lines" 1.148 - mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc && \ 1.149 - for file in $CONF_FILES; do 1.150 - cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$file \ 1.151 - $fs/usr/share/$PACKAGE/$VERSION/etc 1.152 - done 1.153 - status 1.154 - # Pixmaps files 1.155 - XPM_DIR="images images/custom images/ezimage images/gnus images/gud \ 1.156 -images/icons/allout-widgets/*-bg images/low-color images/mail images/mpc \ 1.157 -images/newsticker images/smilies images/smilies/grayscale \ 1.158 -images/smilies/medium images/tree-widget/default images/tree-widget/folder" 1.159 - for dir in $XPM_DIR; do 1.160 - echo -n "Copying $dir xpm files" 1.161 - mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \ 1.162 - cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$dir/*.xpm \ 1.163 - $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \ 1.164 - for file in COPYING README TODO; do 1.165 - if [ -e $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then 1.166 - cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/$file \ 1.167 - $fs/usr/share/$PACKAGE/$VERSION/$dir 1.168 - fi 1.169 - done 1.170 - status 1.171 - done 1.172 - echo -n "Copying png files" 1.173 - ( cd $install/usr/share/$PACKAGE/$VERSION/etc 1.174 - find -type f -name '*.png' | cpio -o -H newc ) | 1.175 - ( cd $fs/usr/share/$PACKAGE/$VERSION/etc ; cpio -id ) 1.176 - status 1.177 - # Licence 1.178 - GNU_FILES="AUTHORS CENSORSHIP COPYING DISTRIB FTP GNU ORDERS README" 1.179 - echo -n "Copying License files" 1.180 - for file in $GNU_FILES; do 1.181 - cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$file \ 1.182 - $fs/usr/share/$PACKAGE/$VERSION/etc 1.183 - done 1.184 - status 1.185 - # Install specific site file 1.186 - echo -n "Installing specific SliTaz file" 1.187 - cp -a $install/usr/share/$PACKAGE/$VERSION/site-lisp \ 1.188 - $fs/usr/share/$PACKAGE && \ 1.189 - mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \ 1.190 - cp -a $stuff/default.el $stuff/site-start.el \ 1.191 - $fs/usr/share/$PACKAGE/site-lisp && \ 1.192 - cp -a $stuff/90-slitaz.el \ 1.193 - $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \ 1.194 - status 1.195 - # Install desktop files for emacs 1.196 - echo -n "Installing emacs menu" 1.197 - mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications && \ 1.198 - cp -a $install/usr/share/applications $fs/usr/share/ && \ 1.199 - cp -a $install/usr/share/icons/hicolor/32x32/apps/emacs.png \ 1.200 - $fs/usr/share/pixmaps 1.201 - status 1.202 - # Use default site-lisp 1.203 - cd $fs/usr/share/$PACKAGE/$VERSION 1.204 - ln -s ../site-lisp site-lisp 1.205 - ;; 1.206 - emacs-help) 1.207 - CAT="development|The GNU Emacs editor - Help files" 1.208 - DEPENDS="emacs" 1.209 - # Help files 1.210 - echo -n "Copying info files" 1.211 - mkdir -p $fs/usr/share/info && \ 1.212 - cp -a $install/usr/share/info/* $fs/usr/share/info && \ 1.213 - status 1.214 - # Tutorial 1.215 - echo -n "Copying tutorial files" 1.216 - mkdir -p $fs/usr/share/emacs/$VERSION/etc && \ 1.217 - cp -a $install/usr/share/emacs/$VERSION/etc/tutorials \ 1.218 - $fs/usr/share/emacs/$VERSION/etc 1.219 - status 1.220 - # refcards 1.221 - echo -n "Copying refcards" 1.222 - mkdir -p $fs/usr/share/emacs/$VERSION/etc/refcards && \ 1.223 - cp -a $install/usr/share/emacs/$VERSION/etc/refcards/*pdf \ 1.224 - $fs/usr/share/emacs/$VERSION/etc/refcards 1.225 - status 1.226 - # Doc 1.227 - echo -n "Copying doc files" 1.228 - cp -a $install/usr/share/emacs/$VERSION/etc/[A-Z]* \ 1.229 - $fs/usr/share/emacs/$VERSION/etc 1.230 - cp -a $install/usr/share/emacs/$VERSION/etc/*.txt \ 1.231 - $fs/usr/share/emacs/$VERSION/etc 1.232 - status 1.233 - ;; 1.234 - emacs-lisp-sources) 1.235 - CAT="development|The GNU Emacs editor - Lisp source files" 1.236 - DEPENDS="emacs" 1.237 - # lisp files 1.238 - echo -n "Copying sources" 1.239 - mkdir -p $fs/usr/share/emacs/$VERSION/etc/lisp 1.240 - ( cd $install/usr/share/emacs/$VERSION/etc/lisp 1.241 - find -type f -name '*.el.gz' | cpio -o -H newc ) | 1.242 - ( cd $fs/usr/share/emacs/$VERSION/etc/lisp ; cpio -id ) 1.243 - # refcards 1.244 - echo -n "Copying refcards sources" 1.245 - mkdir -p $fs/usr/share/emacs/$VERSION/etc/refcards 1.246 - cp -a $install/usr/share/emacs/$VERSION/etc/refcards/*tex \ 1.247 - $fs/usr/share/emacs/$VERSION/etc/refcards 1.248 - status 1.249 - # Doc 1.250 - echo -n "Copying doc files" 1.251 - DOC_FILES="DEBUG MACHINES TODO" 1.252 - for file in $DOC_FILES; do 1.253 - cp -a $install/usr/share/emacs/$VERSION/etc/$file \ 1.254 - $fs/usr/share/emacs/$VERSION/etc 1.255 - done 1.256 - status 1.257 + SUGGESTED="alsa-lib" 1.258 + TAGS="text-editor" 1.259 ;; 1.260 esac 1.261 } 1.262 1.263 -post_install_emacs() 1.264 -{ 1.265 - # linking /usr/bin/emacs to new version 1.266 - [ -h "$1/usr/bin/emacs" ] && rm -f "$1/usr/bin/emacs" 1.267 - ln -s /usr/bin/emacs-$VERSION "$1/usr/bin/emacs" 1.268 +# linking /usr/bin/emacs to new version 1.269 +post_install_emacs() { 1.270 + ln -sf /usr/bin/emacs-$VERSION "$1/usr/bin/emacs" 1.271 } 1.272 1.273 -post_remove_emacs() 1.274 -{ 1.275 +post_remove_emacs() { 1.276 rm -rf "$1/usr/share/emacs" 1.277 rm -rf "$1/usr/lib/emacs" 1.278 - rm -f "$1/usr/bin/emacs" 1.279 + rm -f "$1/usr/bin/emacs" 1.280 }