wok-current view emacs/receipt @ rev 14092
emacs 24.2: reverting changes made for the soon upcoming 24.3
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Fri Feb 22 22:55:18 2013 +0100 (2013-02-22) |
parents | 0eb1f12caf8e |
children | fa7280bd03b2 |
line source
1 # SliTaz package receipt.
3 PACKAGE="emacs"
4 VERSION="24.2"
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 gnutls gtk+ jpeg \
9 libgio libpng librsvg util-linux-uuid ncurses pango tiff xorg-server zlib \
10 librsvg libgsf"
11 BUILD_DEPENDS="atk-dev cairo-dev expat-dev dbus-dev freetype-dev \
12 fontconfig-dev giflib-dev glib-dev gnutls-dev gtk+-dev jpeg-dev libgio-dev \
13 libpng-dev librsvg-dev ncurses-dev pango-dev pkg-config tiff-dev xorg-dev \
14 xorg-dev-proto"
15 SUGGESTED="alsa-lib"
16 TARBALL="$PACKAGE-$VERSION.tar.xz"
17 WEB_SITE="http://www.gnu.org/software/emacs/"
18 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
19 #WGET_URL="ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-24.2.93.tar.xz"
20 TAGS="text-editor"
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 cd $src
26 # Gzip workaround in busybox
27 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' Makefile.in
28 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' leim/Makefile.in
29 # Configure (with GCC 4.5.0 workaround)
30 CFLAGS="-g -O2 -fno-optimize-sibling-calls" ./configure $CONFIGURE_ARGS \
31 --infodir=/usr/share/info \
32 --mandir=/usr/share/man \
33 --without-makeinfo \
34 --without-gconf \
35 --with-sound \
36 --with-x \
37 --with-toolkit-scroll-bars \
38 --with-xpm=yes \
39 --libexecdir=/usr/lib \
40 --localstatedir=/var/lib \
41 --sharedstatedir=/var/lib \
42 --prefix=/usr && \
43 make $MAKEFLAGS && \
44 make DESTDIR=$DESTDIR install
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 # Binary files
51 BIN_FILES="ctags ebrowse emacs-$VERSION emacsclient etags grep-changelog"
52 echo -n "Copying emacs binary files"
53 mkdir -p $fs/usr/bin && \
54 for file in $BIN_FILES; do
55 cp -a $_pkg/usr/bin/$file $fs/usr/bin
56 done
57 status
58 # Lib files
59 echo -n "Copying emacs lib files"
60 cp -a $_pkg/usr/lib $fs/usr
61 status
62 strip -s $fs/usr/lib/$PACKAGE/$VERSION/i486-pc-linux-gnu/* 2> /dev/null
63 # lisp files
64 LISP_DIR="lisp lisp/calc lisp/calendar lisp/cedet lisp/cedet/ede \
65 lisp/cedet/semantic lisp/cedet/semantic/analyze lisp/cedet/semantic/bovine \
66 lisp/cedet/semantic/decorate lisp/cedet/semantic/symref lisp/cedet/srecode \
67 lisp/cedet/semantic/wisent lisp/emacs-lisp lisp/emulation lisp/erc lisp/eshell \
68 lisp/gnus lisp/international lisp/language lisp/mail lisp/mh-e lisp/net \
69 lisp/nxml lisp/obsolete lisp/org lisp/play lisp/progmodes lisp/textmodes \
70 lisp/url lisp/vc"
71 for dir in $LISP_DIR; do
72 echo -n "Copying $dir files"
73 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \
74 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
75 $fs/usr/share/$PACKAGE/$VERSION/$dir
76 if [ $(ls $_pkg/usr/share/$PACKAGE/$VERSION/$dir/ | \
77 grep -c \.el$) -gt 0 ]; then
78 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.el \
79 $fs/usr/share/$PACKAGE/$VERSION/$dir
80 fi
81 for file in COPYING README TODO; do
82 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
83 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file \
84 $fs/usr/share/$PACKAGE/$VERSION/$dir
85 fi
86 done
87 status
88 done
89 # Use linux term only
90 LINUX_TERM="README linux.e* rxvt.elc tty-colors.elc vt100.elc xterm.elc"
91 echo -n "Copying lisp/term files (linux only)"
92 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/lisp/term && \
93 for file in $LINUX_TERM; do
94 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/lisp/term/$file \
95 $fs/usr/share/$PACKAGE/$VERSION/lisp/term
96 done
97 status
98 # leim files
99 echo -n "Copying leim files"
100 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/leim && \
101 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/leim/*.el \
102 $fs/usr/share/$PACKAGE/$VERSION/leim
103 status
104 LEIM_FILES="leim/ja-dic leim/quail"
105 for dir in $LEIM_FILES; do
106 echo -n "Copying $dir files"
107 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \
108 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
109 $fs/usr/share/$PACKAGE/$VERSION/$dir && \
110 for file in COPYING README TODO; do
111 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
112 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file \
113 $fs/usr/share/$PACKAGE/$VERSION/$dir
114 fi
115 done
116 status
117 done
118 # Conf files
119 echo -n "Copying conf files"
120 CONF_FILES="ETAGS.README charsets e enriched.doc edt-user.el \
121 forms-d2.dat emacs-buffer.gdb gnus nxml org schema srecode ps-prin0.ps \
122 ps-prin1.ps ses-example.ses spook.lines themes yow.lines"
123 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc && \
124 for file in $CONF_FILES; do
125 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$file \
126 $fs/usr/share/$PACKAGE/$VERSION/etc
127 done
128 status
129 # Pixmaps files
130 XPM_DIR="images images/custom images/ezimage images/gnus images/gud \
131 images/icons/allout-widgets/*-bg images/low-color images/mail images/mpc \
132 images/newsticker images/smilies images/smilies/grayscale \
133 images/smilies/medium images/tree-widget/default images/tree-widget/folder"
134 for dir in $XPM_DIR; do
135 echo -n "Copying $dir xpm files"
136 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
137 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$dir/*.xpm \
138 $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
139 for file in COPYING README TODO; do
140 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
141 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file \
142 $fs/usr/share/$PACKAGE/$VERSION/$dir
143 fi
144 done
145 status
146 done
147 PNG_DIR="images images/gnus images/icons/allout-widgets/*-bg \
148 images/tree-widget/default images/tree-widget/folder"
149 for dir in $PNG_DIR; do
150 echo -n "Copying $dir png files"
151 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$dir/*.png \
152 $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
153 status
154 done
155 # Licence
156 GNU_FILES="AUTHORS CENSORSHIP COPYING DISTRIB FTP GNU ORDERS README \
157 SERVICE copying.paper"
158 echo -n "Copying License files"
159 for file in $GNU_FILES; do
160 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$file \
161 $fs/usr/share/$PACKAGE/$VERSION/etc
162 done
163 status
164 # Install specific site file
165 echo -n "Installing specific SliTaz file"
166 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/site-lisp \
167 $fs/usr/share/$PACKAGE && \
168 mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
169 cp -a $stuff/default.el $fs/usr/share/$PACKAGE/site-lisp && \
170 cp -a $stuff/90-slitaz.el \
171 $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
172 status
173 # Install desktop files for emacs
174 echo -n "Installing emacs menu"
175 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications && \
176 cp -a $_pkg/usr/share/applications $fs/usr/share/ && \
177 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/emacs.png \
178 $fs/usr/share/pixmaps
179 status
180 # Add a desktop file for emacs client
181 echo -n "Installing emacsclient menu"
182 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/emacs.desktop \
183 $fs/usr/share/applications/emacsclient.desktop && \
184 sed -i 's/Exec.*/Exec=xterm -e emacsclient --alternate-editor="" %F/' \
185 $fs/usr/share/applications/emacsclient.desktop && \
186 sed -i 's/Name=.*/Name=Emacsclient/' \
187 $fs/usr/share/applications/emacsclient.desktop
188 status
189 # Use default site-lisp
190 cd $fs/usr/share/$PACKAGE/$VERSION
191 ln -s ../site-lisp site-lisp
192 }
194 post_install()
195 {
196 cd /usr/share/$PACKAGE/$VERSION/site-lisp
197 cat <<-EOF >site-start.el
198 ;; site-start.el for SliTaz -*- no-byte-compile: t -*-
199 ;;
200 ;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009.
201 ;;
202 ;; This default site startup file for Emacs was created by tazpkg
203 ;; reconfigure emacs. You may modify this file, replace it by your
204 ;; own site initialisation, or even remove it completely.
205 ;;
206 EOF
207 START_FILES="$(ls site-start.d/ | sort)"
208 for file in $START_FILES; do
209 cat site-start.d/$file >> site-start.el
210 done
211 # linking /usr/bin/emacs to new version
212 [ -h /usr/bin/emacs ] && rm -f /usr/bin/emacs
213 ln -s /usr/bin/emacs-$VERSION /usr/bin/emacs
214 }
216 post_remove()
217 {
218 rm -rf /usr/share/emacs
219 rm -rf /usr/lib/emacs
220 rm -f /usr/bin/emacs
221 }