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