wok-current view emacs/receipt @ rev 14841
libofx, grisbi: add LICENSE
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jul 17 23:20:21 2013 +0200 (2013-07-17) |
parents | 0bf5627a5e3f |
children | 2b9f96603415 |
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 DEPENDS="atk cairo dbus expat freetype fontconfig giflib glib gnutls gtk+ jpeg \
9 libgio libpng librsvg util-linux-uuid ncurses pango tiff xorg-server zlib \
10 librsvg libgsf"
11 BUILD_DEPENDS="atk-dev cairo-dev expat-dev dbus-dev freetype-dev \
12 fontconfig-dev giflib-dev glib-dev gnutls-dev gtk+-dev jpeg-dev libgio-dev \
13 libpng-dev librsvg-dev ncurses-dev pango-dev pkg-config tiff-dev xorg-dev \
14 xorg-dev-proto"
15 SUGGESTED="alsa-lib"
16 TARBALL="$PACKAGE-$VERSION.tar.xz"
17 WEB_SITE="http://www.gnu.org/software/emacs/"
18 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
19 #WGET_URL="ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-24.2.93.tar.xz"
20 TAGS="text-editor"
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 cd $src
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 $_pkg/usr/bin/$file $fs/usr/bin
56 done
57 status
58 # Lib files
59 echo -n "Copying emacs lib files"
60 cp -a $_pkg/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 $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
75 $fs/usr/share/$PACKAGE/$VERSION/$dir
76 if [ $(ls $_pkg/usr/share/$PACKAGE/$VERSION/$dir/ | \
77 grep -c \.el$) -gt 0 ]; then
78 cp -a $_pkg/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 $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
83 cp -a $_pkg/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 $_pkg/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 $_pkg/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 $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc \
109 $fs/usr/share/$PACKAGE/$VERSION/$dir && \
110 for file in COPYING README TODO; do
111 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
112 cp -a $_pkg/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 $_pkg/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 $_pkg/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 $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
141 cp -a $_pkg/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 $_pkg/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 $_pkg/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 $_pkg/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 $fs/usr/share/$PACKAGE/site-lisp && \
170 cp -a $stuff/90-slitaz.el \
171 $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
172 status
173 # Install desktop files for emacs
174 echo -n "Installing emacs menu"
175 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications && \
176 cp -a $_pkg/usr/share/applications $fs/usr/share/ && \
177 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/emacs.png \
178 $fs/usr/share/pixmaps
179 status
180 # Use default site-lisp
181 cd $fs/usr/share/$PACKAGE/$VERSION
182 ln -s ../site-lisp site-lisp
183 }
185 post_install()
186 {
187 cd /usr/share/$PACKAGE/$VERSION/site-lisp
188 cat <<-EOF >site-start.el
189 ;; site-start.el for SliTaz -*- no-byte-compile: t -*-
190 ;;
191 ;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009.
192 ;;
193 ;; This default site startup file for Emacs was created by tazpkg
194 ;; reconfigure emacs. You may modify this file, replace it by your
195 ;; own site initialisation, or even remove it completely.
196 ;;
197 EOF
198 START_FILES="$(ls site-start.d/ | sort)"
199 for file in $START_FILES; do
200 cat site-start.d/$file >> site-start.el
201 done
202 # linking /usr/bin/emacs to new version
203 [ -h /usr/bin/emacs ] && rm -f /usr/bin/emacs
204 ln -s /usr/bin/emacs-$VERSION /usr/bin/emacs
205 }
207 post_remove()
208 {
209 rm -rf /usr/share/emacs
210 rm -rf /usr/lib/emacs
211 rm -f /usr/bin/emacs
212 }