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