wok-next view emacs/receipt @ rev 20015
qemu-light, emacs: up bdeps. abiword: fix build.
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Sat Oct 21 22:32:46 2017 +0200 (2017-10-21) |
parents | 0a1321c0d5e5 |
children | 12c16b0d3df1 |
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 libpng librsvg util-linux-uuid ncurses pango tiff xorg-server zlib \
17 librsvg libgsf libgnutls harfbuzz"
18 BUILD_DEPENDS="atk-dev cairo-dev expat-dev dbus-dev freetype-dev \
19 fontconfig-dev glib-dev gnutls-dev gtk+-dev jpeg-dev \
20 libpng-dev librsvg-dev ncurses-dev pango-dev pkg-config tiff-dev xorg-dev \
21 xorg-dev-proto" # giflib-dev: version 4 needed, add --with-gif=no)
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-gif=no --with-jpeg=no \
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 $stuff/site-start.el \
171 $fs/usr/share/$PACKAGE/site-lisp && \
172 cp -a $stuff/90-slitaz.el \
173 $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
174 status
175 # Install desktop files for emacs
176 echo -n "Installing emacs menu"
177 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications && \
178 cp -a $install/usr/share/applications $fs/usr/share/ && \
179 cp -a $install/usr/share/icons/hicolor/32x32/apps/emacs.png \
180 $fs/usr/share/pixmaps
181 status
182 # Use default site-lisp
183 cd $fs/usr/share/$PACKAGE/$VERSION
184 ln -s ../site-lisp site-lisp
185 }
187 post_install()
188 {
189 # linking /usr/bin/emacs to new version
190 [ -h "$1/usr/bin/emacs" ] && rm -f "$1/usr/bin/emacs"
191 ln -s /usr/bin/emacs-$VERSION "$1/usr/bin/emacs"
192 }
194 post_remove()
195 {
196 rm -rf "$1/usr/share/emacs"
197 rm -rf "$1/usr/lib/emacs"
198 rm -f "$1/usr/bin/emacs"
199 }