wok-4.x view emacs/receipt @ rev 5382
Up: pango (1.28.0)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 01 14:52:42 2010 +0200 (2010-05-01) |
parents | 31c985a0bd3d |
children | a878a8e4e836 |
line source
1 # SliTaz package receipt.
3 PACKAGE="emacs"
4 VERSION="23.1"
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 gtk+ jpeg libgio libpng util-linux-ng-uuid ncurses pango tiff xorg-server zlib librsvg libgsf"
9 BUILD_DEPENDS="atk-dev cairo-dev expat-dev dbus-dev freetype-dev fontconfig-dev giflib-dev glib-dev gtk+-dev jpeg-dev \
10 libgio-dev libpng-dev ncurses-dev pango-dev pkg-config tiff-dev xorg-dev \
11 xorg-dev-proto"
12 SUGGESTED="alsa-lib"
13 TARBALL="$PACKAGE-$VERSION.tar.gz"
14 WEB_SITE="http://www.gnu.org/software/emacs/"
15 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
16 TAGS="text-editor"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 # Gzip workaround in busybox
23 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' Makefile.in
24 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' leim/Makefile.in
25 # Configure
26 ./configure $CONFIGURE_ARGS \
27 --infodir=/usr/share/emacs/info \
28 --mandir=/usr/share/man \
29 --without-makeinfo \
30 --with-sound \
31 --with-x \
32 --with-x-toolkit=gtk \
33 --with-toolkit-scroll-bars \
34 --with-xpm=yes \
35 --libexecdir=/usr/lib \
36 --localstatedir=/var/lib \
37 --sharedstatedir=/var/lib \
38 --prefix=/usr && \
39 make && \
40 make DESTDIR=$PWD/_pkg install
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 # Binary files
47 BIN_FILES="b2m ctags ebrowse emacs emacsclient etags grep-changelog rcs-checkin"
48 echo -n "Copying emacs binary files"
49 mkdir -p $fs/usr/bin && \
50 for file in $BIN_FILES; do
51 cp -a $_pkg/usr/bin/$file $fs/usr/bin
52 done
53 status
54 # Lib files
55 echo -n "Copying emacs lib files"
56 cp -a $_pkg/usr/lib $fs/usr
57 status
58 strip -s $fs/usr/lib/$PACKAGE/$VERSION/i486-pc-linux-gnu/* 2> /dev/null
59 # lisp files
60 LISP_DIR=" lisp lisp/calc lisp/calendar lisp/emacs-lisp lisp/emulation lisp/erc lisp/eshell \
61 lisp/gnus lisp/international lisp/language lisp/mail lisp/mh-e lisp/net lisp/nxml \
62 lisp/obsolete lisp/org lisp/play lisp/progmodes lisp/textmodes lisp/url"
63 for dir in $LISP_DIR; do
64 echo -n "Copying $dir files"
65 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \
66 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc $fs/usr/share/$PACKAGE/$VERSION/$dir
67 if [ `ls $_pkg/usr/share/$PACKAGE/$VERSION/$dir/ | grep -c \.el$` -gt 0 ]; then
68 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.el $fs/usr/share/$PACKAGE/$VERSION/$dir
69 fi
70 for file in COPYING README TODO; do
71 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
72 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file $fs/usr/share/$PACKAGE/$VERSION/$dir
73 fi
74 done
75 status
76 done
77 # Use linux term only
78 LINUX_TERM="README linux.el rxvt.elc tty-colors.elc vt100.elc xterm.elc"
79 echo -n "Copying lisp/term files (linux only)"
80 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/lisp/term && \
81 for file in $LINUX_TERM; do
82 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/lisp/term/$file $fs/usr/share/$PACKAGE/$VERSION/lisp/term
83 done
84 status
85 # leim files
86 echo -n "Copying leim files"
87 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/leim && \
88 cp $_pkg/usr/share/$PACKAGE/$VERSION/leim/*.el $fs/usr/share/$PACKAGE/$VERSION/leim
89 status
90 LEIM_FILES="leim/ja-dic leim/quail"
91 for dir in $LEIM_FILES; do
92 echo -n "Copying $dir files"
93 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \
94 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc $fs/usr/share/$PACKAGE/$VERSION/$dir && \
95 for file in COPYING README TODO; do
96 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
97 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file $fs/usr/share/$PACKAGE/$VERSION/$dir
98 fi
99 done
100 status
101 done
102 # Conf files
103 echo -n "Copying conf files"
104 CONF_FILES="ETAGS.README charsets e emacs2.py emacs3.py emacs-buffer.gdb emacs.py forms-d2.dat \
105 gnus nxml schema enriched.doc ms-kermit ps-prin0.ps ps-prin1.ps ses-example.ses \
106 spook.lines yow.lines"
107 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc && \
108 for file in $CONF_FILES; do
109 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$file $fs/usr/share/$PACKAGE/$VERSION/etc
110 done
111 status
112 # Pixmaps files
113 XPM_DIR=" images images/custom images/ezimage images/gnus images/gud images/mail images/smilies \
114 images/smilies/grayscale images/smilies/medium images/tree-widget/default images/tree-widget/folder"
115 for dir in $XPM_DIR; do
116 echo -n "Copying $dir xpm files"
117 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
118 cp $_pkg/usr/share/$PACKAGE/$VERSION/etc/$dir/*.xpm $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
119 for file in COPYING README TODO; do
120 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
121 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file $fs/usr/share/$PACKAGE/$VERSION/$dir
122 fi
123 done
124 status
125 done
126 PNG_DIR=" images images/gnus images/tree-widget/default images/tree-widget/folder"
127 for dir in $PNG_DIR; do
128 echo -n "Copying $dir png files"
129 cp $_pkg/usr/share/$PACKAGE/$VERSION/etc/$dir/*.png $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
130 status
131 done
132 # Licence
133 GNU_FILES="AUTHORS BABYL CENSORSHIP COPYING DISTRIB FTP GNU ORDERS SERVICE copying.paper"
134 echo -n "Copying License files"
135 for file in $GNU_FILES; do
136 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$file $fs/usr/share/$PACKAGE/$VERSION/etc
137 done
138 status
139 # Install specific site file
140 echo -n "Installing specific SliTaz file"
141 mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
142 cp -a $_pkg/usr/share/$PACKAGE/site-lisp $fs/usr/share/$PACKAGE && \
143 cp -a stuff/default.el $fs/usr/share/$PACKAGE/site-lisp && \
144 cp -a stuff/90-slitaz.el $fs/usr/share/$PACKAGE/site-lisp/site-start.d
145 status
146 # Install desktop files for emacs
147 echo -n "Installing emacs menu"
148 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications && \
149 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/emacs.desktop $fs/usr/share/applications/ && \
150 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/emacs.png $fs/usr/share/pixmaps
151 status
152 # Add a desktop file for emacs client
153 echo -n "Installing emacsclient menu"
154 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/emacs.desktop $fs/usr/share/applications/emacsclient.desktop && \
155 sed -i 's/Exec.*/Exec=xterm -e emacsclient --alternate-editor="" %F/' $fs/usr/share/applications/emacsclient.desktop && \
156 sed -i 's/Name=.*/Name=Emacsclient/' $fs/usr/share/applications/emacsclient.desktop
157 status
158 # Directory workaround
159 cd $fs/usr/share/$PACKAGE/$VERSION
160 ln -s ../site-lisp site-lisp
161 }
163 post_install()
164 {
165 cd /usr/share/emacs/site-lisp
166 cat <<-EOF >site-start.el
167 ;; site-start.el for SliTaz -*- no-byte-compile: t -*-
168 ;;
169 ;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009.
170 ;;
171 ;; This default site startup file for Emacs was created by tazpkg
172 ;; reconfigure emacs. You may modify this file, replace it by your
173 ;; own site initialisation, or even remove it completely.
174 ;;
175 EOF
176 START_FILES=`ls site-start.d/ | sort`
177 for file in $START_FILES; do
178 cat site-start.d/$file >> site-start.el
179 done
180 }
182 post_remove()
183 {
184 rm -rf /usr/share/emacs
185 rm -rf /usr/lib/emacs
186 }