wok-next view emacs/receipt @ rev 16608

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