wok-current annotate emacs/receipt @ rev 14082

Up: emacs (24.2)
author Dominique Corbex <domcox@slitaz.org>
date Fri Feb 22 20:43:21 2013 +0100 (2013-02-22)
parents 73641efed1cc
children 0bf5627a5e3f
rev   line source
domcox@1046 1 # SliTaz package receipt.
domcox@1046 2
domcox@1046 3 PACKAGE="emacs"
domcox@14082 4 VERSION="24.2"
domcox@1046 5 CATEGORY="development"
domcox@1046 6 SHORT_DESC="The GNU Emacs editor"
domcox@3938 7 MAINTAINER="domcox@slitaz.org"
domcox@14082 8 DEPENDS="atk cairo dbus expat freetype fontconfig giflib glib gnutls gtk+ jpeg \
domcox@14082 9 libgio libpng librsvg util-linux-uuid ncurses pango tiff xorg-server zlib \
domcox@14082 10 librsvg libgsf"
domcox@14082 11 BUILD_DEPENDS="atk-dev cairo-dev expat-dev dbus-dev freetype-dev \
domcox@14082 12 fontconfig-dev giflib-dev glib-dev gnutls-dev gtk+-dev jpeg-dev libgio-dev \
domcox@14082 13 libpng-dev librsvg-dev ncurses-dev pango-dev pkg-config tiff-dev xorg-dev \
domcox@14082 14 xorg-dev-proto"
pascal@5000 15 SUGGESTED="alsa-lib"
domcox@14082 16 TARBALL="$PACKAGE-$VERSION.tar.xz"
domcox@1046 17 WEB_SITE="http://www.gnu.org/software/emacs/"
domcox@1046 18 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
domcox@14082 19 #WGET_URL="ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-24.2.93.tar.xz"
jozee@4935 20 TAGS="text-editor"
domcox@1046 21
domcox@1046 22 # Rules to configure and make the package.
domcox@1046 23 compile_rules()
domcox@1046 24 {
domcox@1046 25 cd $src
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
domcox@3938 55 cp -a $_pkg/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"
domcox@3938 60 cp -a $_pkg/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 && \
domcox@14082 74 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
domcox@14082 75 $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@14082 76 if [ $(ls $_pkg/usr/share/$PACKAGE/$VERSION/$dir/ | \
domcox@14082 77 grep -c \.el$) -gt 0 ]; then
domcox@14082 78 cp -a $_pkg/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
domcox@14082 82 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
domcox@14082 83 cp -a $_pkg/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
domcox@14082 94 cp -a $_pkg/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 && \
domcox@14082 101 cp -a $_pkg/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 && \
domcox@14082 108 cp -a $_pkg/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
domcox@14082 111 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
domcox@14082 112 cp -a $_pkg/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@14082 120 CONF_FILES="ETAGS.README charsets e enriched.doc edt-user.el forms \
domcox@14082 121 forms-d2.dat 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
domcox@14082 125 cp -a $_pkg/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 && \
domcox@14082 137 cp -a $_pkg/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
domcox@14082 140 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
domcox@14082 141 cp -a $_pkg/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
domcox@14082 147 PNG_DIR="images images/gnus images/icons/allout-widgets/*-bg \
domcox@14082 148 images/tree-widget/default images/tree-widget/folder"
domcox@3939 149 for dir in $PNG_DIR; do
domcox@3939 150 echo -n "Copying $dir png files"
domcox@14082 151 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$dir/*.png \
domcox@14082 152 $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
domcox@3939 153 status
domcox@3939 154 done
domcox@3938 155 # Licence
domcox@14082 156 GNU_FILES="AUTHORS CENSORSHIP COPYING DISTRIB FTP GNU ORDERS README \
domcox@14082 157 SERVICE copying.paper"
domcox@3938 158 echo -n "Copying License files"
domcox@3938 159 for file in $GNU_FILES; do
domcox@14082 160 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$file \
domcox@14082 161 $fs/usr/share/$PACKAGE/$VERSION/etc
domcox@3938 162 done
domcox@3938 163 status
domcox@1046 164 # Install specific site file
domcox@3938 165 echo -n "Installing specific SliTaz file"
domcox@14082 166 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/site-lisp \
domcox@14082 167 $fs/usr/share/$PACKAGE && \
domcox@3938 168 mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
slaxemulator@11722 169 cp -a $stuff/default.el $fs/usr/share/$PACKAGE/site-lisp && \
domcox@14082 170 cp -a $stuff/90-slitaz.el \
domcox@14082 171 $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
domcox@3938 172 status
domcox@3938 173 # Install desktop files for emacs
domcox@3938 174 echo -n "Installing emacs menu"
domcox@3938 175 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications && \
domcox@14082 176 cp -a $_pkg/usr/share/applications $fs/usr/share/ && \
domcox@14082 177 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/emacs.png \
domcox@14082 178 $fs/usr/share/pixmaps
domcox@3938 179 status
domcox@3938 180 # Add a desktop file for emacs client
domcox@3938 181 echo -n "Installing emacsclient menu"
domcox@14082 182 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/emacs.desktop \
domcox@14082 183 $fs/usr/share/applications/emacsclient.desktop && \
domcox@14082 184 sed -i 's/Exec.*/Exec=xterm -e emacsclient --alternate-editor="" %F/' \
domcox@14082 185 $fs/usr/share/applications/emacsclient.desktop && \
domcox@14082 186 sed -i 's/Name=.*/Name=Emacsclient/' \
domcox@14082 187 $fs/usr/share/applications/emacsclient.desktop
domcox@3938 188 status
domcox@14082 189 # Use default site-lisp
domcox@14082 190 cd $fs/usr/share/$PACKAGE/$VERSION
domcox@1046 191 ln -s ../site-lisp site-lisp
domcox@1046 192 }
domcox@1380 193
domcox@3939 194 post_install()
domcox@3939 195 {
domcox@14082 196 cd /usr/share/$PACKAGE/$VERSION/site-lisp
domcox@3939 197 cat <<-EOF >site-start.el
domcox@3939 198 ;; site-start.el for SliTaz -*- no-byte-compile: t -*-
domcox@3939 199 ;;
domcox@3939 200 ;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009.
domcox@3939 201 ;;
domcox@3939 202 ;; This default site startup file for Emacs was created by tazpkg
domcox@3939 203 ;; reconfigure emacs. You may modify this file, replace it by your
domcox@3939 204 ;; own site initialisation, or even remove it completely.
domcox@3939 205 ;;
domcox@3939 206 EOF
domcox@14082 207 START_FILES="$(ls site-start.d/ | sort)"
domcox@3939 208 for file in $START_FILES; do
domcox@3939 209 cat site-start.d/$file >> site-start.el
domcox@3939 210 done
domcox@14082 211 # linking /usr/bin/emacs to new version
domcox@14082 212 [ -h /usr/bin/emacs ] && rm -f /usr/bin/emacs
domcox@14082 213 ln -s /usr/bin/emacs-$VERSION /usr/bin/emacs
domcox@3939 214 }
domcox@3939 215
domcox@1380 216 post_remove()
domcox@1380 217 {
domcox@3938 218 rm -rf /usr/share/emacs
domcox@3938 219 rm -rf /usr/lib/emacs
domcox@14082 220 rm -f /usr/bin/emacs
domcox@1900 221 }