wok-6.x view emacs/receipt @ rev 24442

created recipe for firefox-official-da
author Hans-G?nter Theisgen
date Mon Feb 14 07:26:07 2022 +0100 (2022-02-14)
parents bb2badbb79d8
children
line source
1 # SliTaz package receipt.
3 PACKAGE="emacs"
4 VERSION="26.3"
5 CATEGORY="editors"
6 TAGS="text-editor"
7 SHORT_DESC="The GNU Emacs editor."
8 MAINTAINER="domcox@slitaz.org"
9 LICENSE="GPL3"
10 WEB_SITE="https://www.gnu.org/software/emacs/"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
15 SUGGESTED="alsa-lib"
16 DEPENDS="atk cairo dbus expat fontconfig freetype giflib glib gnutls gtk+
17 harfbuzz jpeg libgio libgnutls libgsf libpng librsvg libtinfo ncurses
18 pango tiff util-linux-uuid xorg-server zlib"
19 BUILD_DEPENDS="atk-dev autoconf cairo-dev dbus-dev expat-dev fontconfig-dev
20 freetype-dev giflib-dev glib-dev gnutls-dev gtk+-dev jpeg-dev libgio-dev
21 libgnutls libpng-dev librsvg-dev ncurses-dev pango-dev pkg-config tiff-dev
22 xorg-dev xorg-dev-proto"
24 # What is the latest version available today?
25 current_version()
26 {
27 wget -O - ${WGET_URL%/*} 2>/dev/null | \
28 sed "/lisp/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
29 }
31 # Rules to configure and make the package.
32 compile_rules()
33 {
34 sed -i 's|EGifPutExtensionLast|EGifPutExtensionTrailer|' configure*
35 sed -i 's|\(gif = fn_DGifOpen.*\));|\1,NULL);|' src/image.c
36 sed -i 's|fn_DGifCloseFile (gif|&,NULL|' src/image.c
38 # Gzip workaround in busybox
39 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' Makefile.in
40 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' leim/Makefile.in
42 # Configure (with GCC 4.5.0 workaround)
43 ./configure \
44 CFLAGS="-g -O2 -fno-optimize-sibling-calls" \
45 --infodir=/usr/share/info \
46 --mandir=/usr/share/man \
47 --without-makeinfo \
48 --without-gconf \
49 --with-sound \
50 --with-x \
51 --with-toolkit-scroll-bars \
52 --with-xpm=yes \
53 --libexecdir=/usr/lib \
54 --localstatedir=/var/lib \
55 --sharedstatedir=/var/lib \
56 --prefix=/usr \
57 $CONFIGURE_ARGS &&
58 make $MAKEFLAGS &&
59 make DESTDIR=$DESTDIR install
60 }
62 # Rules to gen a SliTaz package suitable for Tazpkg.
63 genpkg_rules()
64 {
65 # Binary files
66 BIN_FILES="ctags ebrowse emacs-$VERSION emacsclient etags"
67 echo -n "Copying emacs binary files"
68 mkdir -p $fs/usr/bin &&
69 for file in $BIN_FILES
70 do
71 cp -a $install/usr/bin/$file $fs/usr/bin
72 done
73 status
74 ln -s /usr/bin/emacs-$VERSION $fs/usr/bin/emacs
75 ln -s /usr/bin/emacs-$VERSION $fs/usr/bin/xemacs
77 # Libraries
78 echo -n "Copying emacs libraries"
79 cp -a $install/usr/lib $fs/usr
80 status
81 strip -s $fs/usr/lib/$PACKAGE/$VERSION/i486-pc-linux-gnu/* 2> /dev/null
83 # lisp files
84 LISP_DIR="lisp lisp/calc lisp/calendar lisp/cedet lisp/cedet/ede \
85 lisp/cedet/semantic lisp/cedet/semantic/analyze lisp/cedet/semantic/bovine \
86 lisp/cedet/semantic/decorate lisp/cedet/semantic/symref lisp/cedet/srecode \
87 lisp/cedet/semantic/wisent lisp/emacs-lisp lisp/emulation lisp/erc lisp/eshell \
88 lisp/gnus lisp/international lisp/language lisp/leim lisp/leim/ja-dic lisp/leim/quail \
89 lisp/mail lisp/mh-e lisp/net lisp/nxml lisp/obsolete lisp/org lisp/play \
90 lisp/progmodes lisp/textmodes lisp/url lisp/vc"
91 for dir in $LISP_DIR
92 do
93 echo -n "Copying $dir files"
94 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir &&
95 if [ $(ls $install/usr/share/$PACKAGE/$VERSION/$dir/ | \
96 grep -c \.elc$) -gt 0 ]
97 then
98 cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
99 $fs/usr/share/$PACKAGE/$VERSION/$dir
100 fi
101 if [ $(ls $install/usr/share/$PACKAGE/$VERSION/$dir/ | \
102 grep -c \.el$) -gt 0 ]
103 then
104 cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/*.el \
105 $fs/usr/share/$PACKAGE/$VERSION/$dir
106 fi
107 for file in COPYING README TODO
108 do
109 if [ -e $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]
110 then
111 cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/$file \
112 $fs/usr/share/$PACKAGE/$VERSION/$dir
113 fi
114 done
115 status
116 done
118 # Use linux terminal only
119 LINUX_TERM="README linux.e* rxvt.elc tty-colors.elc vt100.elc xterm.elc"
120 echo -n "Copying lisp/term files (linux only)"
121 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/lisp/term &&
122 for file in $LINUX_TERM
123 do
124 cp -a $install/usr/share/$PACKAGE/$VERSION/lisp/term/$file \
125 $fs/usr/share/$PACKAGE/$VERSION/lisp/term
126 done
127 status
129 # leim files
130 # 26.3 copied with lisp files
131 # echo -n "Copying leim files"
132 # mkdir -p $fs/usr/share/$PACKAGE/$VERSION/leim &&
133 # cp -a $install/usr/share/$PACKAGE/$VERSION/leim/*.el \
134 # $fs/usr/share/$PACKAGE/$VERSION/leim
135 # status
136 # LEIM_FILES="leim/ja-dic leim/quail"
137 # for dir in $LEIM_FILES
138 # do
139 # echo -n "Copying $dir files"
140 # mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir &&
141 # cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
142 # $fs/usr/share/$PACKAGE/$VERSION/$dir && \
143 # for file in COPYING README TODO
144 # do
145 # if [ -e $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]
146 # then
147 # cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/$file \
148 # $fs/usr/share/$PACKAGE/$VERSION/$dir
149 # fi
150 # done
151 # status
152 # done
154 # Configuration files
155 echo -n "Copying configuration files"
156 CONF_FILES="ETAGS.README charsets e edt-user.el forms \
157 emacs-buffer.gdb gnus nxml org schema srecode ps-prin0.ps \
158 ps-prin1.ps ses-example.ses spook.lines themes yow.lines"
159 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc &&
160 for file in $CONF_FILES
161 do
162 cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$file \
163 $fs/usr/share/$PACKAGE/$VERSION/etc
164 done
165 status
167 # Pixmaps files
168 XPM_DIR="images images/custom images/ezimage images/gnus images/gud \
169 images/icons/allout-widgets/*-bg images/low-color images/mail images/mpc \
170 images/newsticker images/smilies images/smilies/grayscale \
171 images/smilies/medium images/tree-widget/default images/tree-widget/folder"
172 for dir in $XPM_DIR
173 do
174 echo -n "Copying $dir xpm files"
175 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc/$dir &&
176 cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$dir/*.xpm \
177 $fs/usr/share/$PACKAGE/$VERSION/etc/$dir &&
178 for file in COPYING README TODO
179 do
180 if [ -e $install/usr/share/$PACKAGE/$VERSION/$dir/$file ]
181 then
182 cp -a $install/usr/share/$PACKAGE/$VERSION/$dir/$file \
183 $fs/usr/share/$PACKAGE/$VERSION/$dir
184 fi
185 done
186 status
187 done
188 PNG_DIR="images images/gnus images/icons/allout-widgets/dark-bg \
189 images/icons/allout-widgets/light-bg images/tree-widget/default \
190 images/tree-widget/folder"
191 for dir in $PNG_DIR
192 do
193 echo -n "Copying $dir png files"
194 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc/$dir 2> /dev/null || true
195 cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$dir/*.png \
196 $fs/usr/share/$PACKAGE/$VERSION/etc/$dir &&
197 status
198 done
200 # Licence
201 GNU_FILES="AUTHORS CENSORSHIP COPYING DISTRIB FTP GNU ORDERS README"
202 echo -n "Copying License files"
203 for file in $GNU_FILES
204 do
205 cp -a $install/usr/share/$PACKAGE/$VERSION/etc/$file \
206 $fs/usr/share/$PACKAGE/$VERSION/etc
207 done
208 status
210 # Install specific site files
211 echo -n "Installing specific SliTaz files"
212 cp -a $install/usr/share/$PACKAGE/$VERSION/site-lisp \
213 $fs/usr/share/$PACKAGE &&
214 mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d &&
215 cp -a $stuff/default.el $fs/usr/share/$PACKAGE/site-lisp &&
216 cp -a $stuff/site-start.el $fs/usr/share/$PACKAGE/site-lisp &&
217 cp -a $stuff/90-slitaz.el $fs/usr/share/$PACKAGE/site-lisp/site-start.d &&
218 status
220 # Install desktop files for emacs
221 echo -n "Installing emacs menu"
222 mkdir -p $fs/usr/share/pixmaps &&
223 mkdir -p $fs/usr/share/applications &&
224 cp -a $install/usr/share/applications $fs/usr/share/ &&
225 cp -a $install/usr/share/icons/hicolor/32x32/apps/emacs.png \
226 $fs/usr/share/pixmaps
227 status
229 # Use default site-lisp
230 cd $fs/usr/share/$PACKAGE/$VERSION
231 ln -s ../site-lisp site-lisp
232 }