wok-4.x annotate emacs/receipt @ rev 5425

git: needs gnu tar
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue May 04 21:04:56 2010 +0200 (2010-05-04)
parents 31c985a0bd3d
children a878a8e4e836
rev   line source
domcox@1046 1 # SliTaz package receipt.
domcox@1046 2
domcox@1046 3 PACKAGE="emacs"
domcox@3938 4 VERSION="23.1"
domcox@1046 5 CATEGORY="development"
domcox@1046 6 SHORT_DESC="The GNU Emacs editor"
domcox@3938 7 MAINTAINER="domcox@slitaz.org"
paul@4378 8 DEPENDS="atk cairo dbus expat freetype fontconfig giflib glib gtk+ jpeg libgio libpng util-linux-ng-uuid ncurses pango tiff xorg-server zlib librsvg libgsf"
domcox@3938 9 BUILD_DEPENDS="atk-dev cairo-dev expat-dev dbus-dev freetype-dev fontconfig-dev giflib-dev glib-dev gtk+-dev jpeg-dev \
pascal@5000 10 libgio-dev libpng-dev ncurses-dev pango-dev pkg-config tiff-dev xorg-dev \
pascal@5000 11 xorg-dev-proto"
pascal@5000 12 SUGGESTED="alsa-lib"
domcox@1046 13 TARBALL="$PACKAGE-$VERSION.tar.gz"
domcox@1046 14 WEB_SITE="http://www.gnu.org/software/emacs/"
domcox@1046 15 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
jozee@4935 16 TAGS="text-editor"
domcox@1046 17
domcox@1046 18 # Rules to configure and make the package.
domcox@1046 19 compile_rules()
domcox@1046 20 {
domcox@1046 21 cd $src
domcox@1046 22 # Gzip workaround in busybox
domcox@1900 23 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' Makefile.in
domcox@1900 24 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' leim/Makefile.in
domcox@1046 25 # Configure
domcox@1046 26 ./configure $CONFIGURE_ARGS \
domcox@3938 27 --infodir=/usr/share/emacs/info \
domcox@3938 28 --mandir=/usr/share/man \
domcox@3938 29 --without-makeinfo \
domcox@3938 30 --with-sound \
domcox@3938 31 --with-x \
domcox@3938 32 --with-x-toolkit=gtk \
domcox@3938 33 --with-toolkit-scroll-bars \
domcox@3938 34 --with-xpm=yes \
domcox@3938 35 --libexecdir=/usr/lib \
domcox@3938 36 --localstatedir=/var/lib \
domcox@3938 37 --sharedstatedir=/var/lib \
domcox@3938 38 --prefix=/usr && \
domcox@3938 39 make && \
domcox@1046 40 make DESTDIR=$PWD/_pkg install
domcox@1046 41 }
domcox@1046 42
domcox@1046 43 # Rules to gen a SliTaz package suitable for Tazpkg.
domcox@1046 44 genpkg_rules()
domcox@1046 45 {
domcox@1046 46 # Binary files
domcox@3938 47 BIN_FILES="b2m ctags ebrowse emacs emacsclient etags grep-changelog rcs-checkin"
domcox@3938 48 echo -n "Copying emacs binary files"
domcox@3938 49 mkdir -p $fs/usr/bin && \
domcox@3938 50 for file in $BIN_FILES; do
domcox@3938 51 cp -a $_pkg/usr/bin/$file $fs/usr/bin
domcox@3938 52 done
domcox@3938 53 status
domcox@3938 54 # Lib files
domcox@3938 55 echo -n "Copying emacs lib files"
domcox@3938 56 cp -a $_pkg/usr/lib $fs/usr
domcox@3938 57 status
domcox@3938 58 strip -s $fs/usr/lib/$PACKAGE/$VERSION/i486-pc-linux-gnu/* 2> /dev/null
domcox@3938 59 # lisp files
domcox@3938 60 LISP_DIR=" lisp lisp/calc lisp/calendar lisp/emacs-lisp lisp/emulation lisp/erc lisp/eshell \
domcox@3938 61 lisp/gnus lisp/international lisp/language lisp/mail lisp/mh-e lisp/net lisp/nxml \
domcox@3938 62 lisp/obsolete lisp/org lisp/play lisp/progmodes lisp/textmodes lisp/url"
domcox@3938 63 for dir in $LISP_DIR; do
domcox@3938 64 echo -n "Copying $dir files"
domcox@3938 65 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \
domcox@3938 66 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 67 if [ `ls $_pkg/usr/share/$PACKAGE/$VERSION/$dir/ | grep -c \.el$` -gt 0 ]; then
domcox@3938 68 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.el $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 69 fi
domcox@3938 70 for file in COPYING README TODO; do
domcox@3938 71 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
domcox@3938 72 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 73 fi
domcox@3938 74 done
domcox@3938 75 status
domcox@3938 76 done
domcox@3938 77 # Use linux term only
domcox@3938 78 LINUX_TERM="README linux.el rxvt.elc tty-colors.elc vt100.elc xterm.elc"
domcox@3938 79 echo -n "Copying lisp/term files (linux only)"
domcox@3938 80 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/lisp/term && \
domcox@3938 81 for file in $LINUX_TERM; do
domcox@3938 82 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/lisp/term/$file $fs/usr/share/$PACKAGE/$VERSION/lisp/term
domcox@3938 83 done
domcox@3938 84 status
domcox@3938 85 # leim files
domcox@3938 86 echo -n "Copying leim files"
domcox@3938 87 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/leim && \
domcox@3938 88 cp $_pkg/usr/share/$PACKAGE/$VERSION/leim/*.el $fs/usr/share/$PACKAGE/$VERSION/leim
domcox@3938 89 status
domcox@3938 90 LEIM_FILES="leim/ja-dic leim/quail"
domcox@3938 91 for dir in $LEIM_FILES; do
domcox@3938 92 echo -n "Copying $dir files"
domcox@3938 93 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \
domcox@3938 94 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc $fs/usr/share/$PACKAGE/$VERSION/$dir && \
domcox@3938 95 for file in COPYING README TODO; do
domcox@3938 96 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
domcox@3938 97 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 98 fi
domcox@3938 99 done
domcox@3938 100 status
domcox@3938 101 done
domcox@1046 102 # Conf files
domcox@3938 103 echo -n "Copying conf files"
domcox@3938 104 CONF_FILES="ETAGS.README charsets e emacs2.py emacs3.py emacs-buffer.gdb emacs.py forms-d2.dat \
domcox@3938 105 gnus nxml schema enriched.doc ms-kermit ps-prin0.ps ps-prin1.ps ses-example.ses \
domcox@3938 106 spook.lines yow.lines"
domcox@3938 107 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc && \
domcox@3938 108 for file in $CONF_FILES; do
domcox@3938 109 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$file $fs/usr/share/$PACKAGE/$VERSION/etc
domcox@1046 110 done
domcox@3938 111 status
domcox@3938 112 # Pixmaps files
domcox@3938 113 XPM_DIR=" images images/custom images/ezimage images/gnus images/gud images/mail images/smilies \
domcox@3938 114 images/smilies/grayscale images/smilies/medium images/tree-widget/default images/tree-widget/folder"
domcox@3938 115 for dir in $XPM_DIR; do
domcox@3939 116 echo -n "Copying $dir xpm files"
domcox@3938 117 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
domcox@3938 118 cp $_pkg/usr/share/$PACKAGE/$VERSION/etc/$dir/*.xpm $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
domcox@3938 119 for file in COPYING README TODO; do
domcox@3938 120 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
domcox@3938 121 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 122 fi
domcox@3938 123 done
domcox@3938 124 status
domcox@3938 125 done
domcox@3939 126 PNG_DIR=" images images/gnus images/tree-widget/default images/tree-widget/folder"
domcox@3939 127 for dir in $PNG_DIR; do
domcox@3939 128 echo -n "Copying $dir png files"
domcox@3939 129 cp $_pkg/usr/share/$PACKAGE/$VERSION/etc/$dir/*.png $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
domcox@3939 130 status
domcox@3939 131 done
domcox@3938 132 # Licence
domcox@3938 133 GNU_FILES="AUTHORS BABYL CENSORSHIP COPYING DISTRIB FTP GNU ORDERS SERVICE copying.paper"
domcox@3938 134 echo -n "Copying License files"
domcox@3938 135 for file in $GNU_FILES; do
domcox@3938 136 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$file $fs/usr/share/$PACKAGE/$VERSION/etc
domcox@3938 137 done
domcox@3938 138 status
domcox@1046 139 # Install specific site file
domcox@3938 140 echo -n "Installing specific SliTaz file"
domcox@3938 141 mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
domcox@3938 142 cp -a $_pkg/usr/share/$PACKAGE/site-lisp $fs/usr/share/$PACKAGE && \
domcox@3939 143 cp -a stuff/default.el $fs/usr/share/$PACKAGE/site-lisp && \
domcox@3939 144 cp -a stuff/90-slitaz.el $fs/usr/share/$PACKAGE/site-lisp/site-start.d
domcox@3938 145 status
domcox@3938 146 # Install desktop files for emacs
domcox@3938 147 echo -n "Installing emacs menu"
domcox@3938 148 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications && \
domcox@3938 149 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/emacs.desktop $fs/usr/share/applications/ && \
domcox@3938 150 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/emacs.png $fs/usr/share/pixmaps
domcox@3938 151 status
domcox@3938 152 # Add a desktop file for emacs client
domcox@3938 153 echo -n "Installing emacsclient menu"
domcox@3938 154 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/emacs.desktop $fs/usr/share/applications/emacsclient.desktop && \
domcox@3938 155 sed -i 's/Exec.*/Exec=xterm -e emacsclient --alternate-editor="" %F/' $fs/usr/share/applications/emacsclient.desktop && \
domcox@3938 156 sed -i 's/Name=.*/Name=Emacsclient/' $fs/usr/share/applications/emacsclient.desktop
domcox@3938 157 status
domcox@1046 158 # Directory workaround
domcox@1046 159 cd $fs/usr/share/$PACKAGE/$VERSION
domcox@1046 160 ln -s ../site-lisp site-lisp
domcox@1046 161 }
domcox@1380 162
domcox@3939 163 post_install()
domcox@3939 164 {
domcox@3939 165 cd /usr/share/emacs/site-lisp
domcox@3939 166 cat <<-EOF >site-start.el
domcox@3939 167 ;; site-start.el for SliTaz -*- no-byte-compile: t -*-
domcox@3939 168 ;;
domcox@3939 169 ;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009.
domcox@3939 170 ;;
domcox@3939 171 ;; This default site startup file for Emacs was created by tazpkg
domcox@3939 172 ;; reconfigure emacs. You may modify this file, replace it by your
domcox@3939 173 ;; own site initialisation, or even remove it completely.
domcox@3939 174 ;;
domcox@3939 175 EOF
domcox@3939 176 START_FILES=`ls site-start.d/ | sort`
domcox@3939 177 for file in $START_FILES; do
domcox@3939 178 cat site-start.d/$file >> site-start.el
domcox@3939 179 done
domcox@3939 180 }
domcox@3939 181
domcox@1380 182 post_remove()
domcox@1380 183 {
domcox@3938 184 rm -rf /usr/share/emacs
domcox@3938 185 rm -rf /usr/lib/emacs
domcox@1900 186 }