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