wok view emacs/receipt @ rev 13429

partclone: add btrfs & hfsplus support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 04 11:53:21 2012 +0200 (2012-10-04)
parents a91f4b450f79
children 0eb1f12caf8e
line source
1 # SliTaz package receipt.
3 PACKAGE="emacs"
4 VERSION="23.4"
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-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/info \
29 --mandir=/usr/share/man \
30 --without-makeinfo \
31 --without-gconf \
32 --with-sound \
33 --with-x \
34 --with-toolkit-scroll-bars \
35 --with-xpm=yes \
36 --libexecdir=/usr/lib \
37 --localstatedir=/var/lib \
38 --sharedstatedir=/var/lib \
39 --prefix=/usr && \
40 make $MAKEFLAGS && \
41 make DESTDIR=$DESTDIR install
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 # Binary files
48 BIN_FILES="b2m ctags ebrowse emacs emacsclient etags grep-changelog rcs-checkin"
49 echo -n "Copying emacs binary files"
50 mkdir -p $fs/usr/bin && \
51 for file in $BIN_FILES; do
52 cp -a $_pkg/usr/bin/$file $fs/usr/bin
53 done
54 status
55 # Lib files
56 echo -n "Copying emacs lib files"
57 cp -a $_pkg/usr/lib $fs/usr
58 status
59 strip -s $fs/usr/lib/$PACKAGE/${VERSION:0:4}/i486-pc-linux-gnu/* 2> /dev/null
60 # lisp files
61 LISP_DIR=" lisp lisp/calc lisp/calendar lisp/cedet lisp/cedet/ede lisp/cedet/semantic \
62 lisp/cedet/semantic/analyze lisp/cedet/semantic/bovine lisp/cedet/semantic/decorate \
63 lisp/cedet/semantic/symref lisp/cedet/semantic/wisent lisp/emacs-lisp lisp/emulation \
64 lisp/erc lisp/eshell lisp/gnus lisp/international lisp/language lisp/mail lisp/mh-e \
65 lisp/net lisp/nxml lisp/obsolete lisp/org lisp/play lisp/progmodes lisp/textmodes lisp/url"
66 for dir in $LISP_DIR; do
67 echo -n "Copying $dir files"
68 mkdir -p $fs/usr/share/$PACKAGE/${VERSION:0:4}/$dir && \
69 cp $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/$dir/*.elc $fs/usr/share/$PACKAGE/${VERSION:0:4}/$dir
70 if [ `ls $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/$dir/ | grep -c \.el$` -gt 0 ]; then
71 cp $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/$dir/*.el $fs/usr/share/$PACKAGE/${VERSION:0:4}/$dir
72 fi
73 for file in COPYING README TODO; do
74 if [ -e $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/$dir/$file ]; then
75 cp $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/$dir/$file $fs/usr/share/$PACKAGE/${VERSION:0:4}/$dir
76 fi
77 done
78 status
79 done
80 # Use linux term only
81 LINUX_TERM="README linux.el rxvt.elc tty-colors.elc vt100.elc xterm.elc"
82 echo -n "Copying lisp/term files (linux only)"
83 mkdir -p $fs/usr/share/$PACKAGE/${VERSION:0:4}/lisp/term && \
84 for file in $LINUX_TERM; do
85 cp -a $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/lisp/term/$file $fs/usr/share/$PACKAGE/${VERSION:0:4}/lisp/term
86 done
87 status
88 # leim files
89 echo -n "Copying leim files"
90 mkdir -p $fs/usr/share/$PACKAGE/${VERSION:0:4}/leim && \
91 cp $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/leim/*.el $fs/usr/share/$PACKAGE/${VERSION:0:4}/leim
92 status
93 LEIM_FILES="leim/ja-dic leim/quail"
94 for dir in $LEIM_FILES; do
95 echo -n "Copying $dir files"
96 mkdir -p $fs/usr/share/$PACKAGE/${VERSION:0:4}/$dir && \
97 cp $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/$dir/*.elc $fs/usr/share/$PACKAGE/${VERSION:0:4}/$dir && \
98 for file in COPYING README TODO; do
99 if [ -e $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/$dir/$file ]; then
100 cp $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/$dir/$file $fs/usr/share/$PACKAGE/${VERSION:0:4}/$dir
101 fi
102 done
103 status
104 done
105 # Conf files
106 echo -n "Copying conf files"
107 CONF_FILES="ETAGS.README charsets e edt-user.el emacs2.py emacs3.py emacs-buffer.gdb emacs.py \
108 forms-d2.dat gnus nxml schema enriched.doc ms-kermit ps-prin0.ps ps-prin1.ps \
109 ses-example.ses spook.lines yow.lines"
110 mkdir -p $fs/usr/share/$PACKAGE/${VERSION:0:4}/etc && \
111 for file in $CONF_FILES; do
112 cp -a $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/etc/$file $fs/usr/share/$PACKAGE/${VERSION:0:4}/etc
113 done
114 status
115 # Pixmaps files
116 XPM_DIR=" images images/custom images/ezimage images/gnus images/gud images/mail images/mpc \
117 images/smilies images/smilies/grayscale images/smilies/medium images/tree-widget/default \
118 images/tree-widget/folder"
119 for dir in $XPM_DIR; do
120 echo -n "Copying $dir xpm files"
121 mkdir -p $fs/usr/share/$PACKAGE/${VERSION:0:4}/etc/$dir && \
122 cp $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/etc/$dir/*.xpm $fs/usr/share/$PACKAGE/${VERSION:0:4}/etc/$dir && \
123 for file in COPYING README TODO; do
124 if [ -e $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/$dir/$file ]; then
125 cp $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/$dir/$file $fs/usr/share/$PACKAGE/${VERSION:0:4}/$dir
126 fi
127 done
128 status
129 done
130 PNG_DIR=" images images/gnus images/tree-widget/default images/tree-widget/folder"
131 for dir in $PNG_DIR; do
132 echo -n "Copying $dir png files"
133 cp $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/etc/$dir/*.png $fs/usr/share/$PACKAGE/${VERSION:0:4}/etc/$dir && \
134 status
135 done
136 # Licence
137 GNU_FILES="AUTHORS BABYL CENSORSHIP COPYING DISTRIB FTP GNU ORDERS SERVICE copying.paper"
138 echo -n "Copying License files"
139 for file in $GNU_FILES; do
140 cp -a $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/etc/$file $fs/usr/share/$PACKAGE/${VERSION:0:4}/etc
141 done
142 status
143 # Install specific site file
144 echo -n "Installing specific SliTaz file"
145 mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
146 cp -a $_pkg/usr/share/$PACKAGE/site-lisp $fs/usr/share/$PACKAGE && \
147 cp -a $stuff/default.el $fs/usr/share/$PACKAGE/site-lisp && \
148 cp -a $stuff/90-slitaz.el $fs/usr/share/$PACKAGE/site-lisp/site-start.d
149 status
150 # Install desktop files for emacs
151 echo -n "Installing emacs menu"
152 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications && \
153 cp -a $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/etc/emacs.desktop $fs/usr/share/applications/ && \
154 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/emacs.png $fs/usr/share/pixmaps
155 status
156 # Add a desktop file for emacs client
157 echo -n "Installing emacsclient menu"
158 cp -a $_pkg/usr/share/$PACKAGE/${VERSION:0:4}/etc/emacs.desktop $fs/usr/share/applications/emacsclient.desktop && \
159 sed -i 's/Exec.*/Exec=xterm -e emacsclient --alternate-editor="" %F/' $fs/usr/share/applications/emacsclient.desktop && \
160 sed -i 's/Name=.*/Name=Emacsclient/' $fs/usr/share/applications/emacsclient.desktop
161 status
162 # Directory workaround
163 cd $fs/usr/share/$PACKAGE/${VERSION:0:4}
164 ln -s ../site-lisp site-lisp
165 }
167 post_install()
168 {
169 cd /usr/share/emacs/site-lisp
170 cat <<-EOF >site-start.el
171 ;; site-start.el for SliTaz -*- no-byte-compile: t -*-
172 ;;
173 ;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009.
174 ;;
175 ;; This default site startup file for Emacs was created by tazpkg
176 ;; reconfigure emacs. You may modify this file, replace it by your
177 ;; own site initialisation, or even remove it completely.
178 ;;
179 EOF
180 START_FILES=`ls site-start.d/ | sort`
181 for file in $START_FILES; do
182 cat site-start.d/$file >> site-start.el
183 done
184 }
186 post_remove()
187 {
188 rm -rf /usr/share/emacs
189 rm -rf /usr/lib/emacs
190 }