wok-next view emacs/receipt @ rev 19039

Webian Shell - again
author Leonardo Laporte <hackdorte@sapo.pt>
date Fri Apr 15 09:08:59 2016 -0300 (2016-04-15)
parents 9e01bc6321ea
children e70c0b9c5adf
line source
1 # SliTaz package receipt.
3 PACKAGE="emacs"
4 VERSION="24.3"
5 CATEGORY="editors"
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 libtinfo libgnutls harfbuzz"
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 # 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 $install/usr/bin/$file $fs/usr/bin
56 done
57 status
58 # Lib files
59 echo -n "Copying emacs lib files"
60 cp -a $install/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 $install/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
75 $fs/usr/share/$PACKAGE/$VERSION/$dir
76 if [ $(ls $install/usr/share/$PACKAGE/$VERSION/$dir/ | \
77 grep -c \.el$) -gt 0 ]; then
78 cp -a $install/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 $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
83 cp -a $install/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 $install/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 $install/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 $install/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
109 $fs/usr/share/$PACKAGE/$VERSION/$dir && \
110 for file in COPYING README TODO; do
111 if [ -e $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
112 cp -a $install/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 forms \
121 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 $install/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 $install/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 $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
141 cp -a $install/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 $install/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 $install/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 $install/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 $stuff/site-start.el \
170 $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 # linking /usr/bin/emacs to new version
189 [ -h "$1/usr/bin/emacs" ] && rm -f "$1/usr/bin/emacs"
190 ln -s /usr/bin/emacs-$VERSION "$1/usr/bin/emacs"
191 }
193 post_remove()
194 {
195 rm -rf "$1/usr/share/emacs"
196 rm -rf "$1/usr/lib/emacs"
197 rm -f "$1/usr/bin/emacs"
198 }