wok-current view emacs/receipt @ rev 4788

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