Debian Codegraph @

src/util/ecl.spec

raw
1 %define _specver $Id$
2 %define _name ecl
3 %define _pkg %{_name}
4 %define _ver ECL_VERSION
5 %define _rel 1
6 %define _pkgver %{_pkg}-%{_ver}
7 %define _nv %{_name}-%{_ver}
8
9 %define __installp %{__install} -p
10 %define __installdir %{__installp} -d
11
12 # define _buildtmp # absurd that RPM connects both build and installation
13 # _tmppath values
14 %define _buildtmp %{_tmppath}
15 %define _filelist filelist-%{_pkg}-%{_ver}-%{_rel}
16
17 ##########################################################################
18
19 Summary: ECL - Embeddable Common-Lisp %{_ver}
20 Name: %{_pkg}
21 Version: %{_ver}
22 Release: %{_rel}
23 License: LGPL
24 Group: Development/Languages/Lisp
25 URL: http://ecls.sourceforge.net/
26 Source0: http://easynews.dl.sourceforge.net/sourceforge/ecls/ecl-%{_ver}.tgz
27 # want to add these later.
28 #Source1: ecls-regexp.lisp
29 BuildRoot: %{_buildtmp}/%{_nv}-buildroot
30 #% REDHAT BuildRequires: rpm-devel
31 #% REDHAT BuildRequires: gmp-devel
32 #% SUSE BuildRequires: rpm
33 #% SUSE BuildRequires: gmp
34
35 %description
36
37 ECL stands for Embeddable Common-Lisp.
38
39 The ECL project is an effort to modernize Giuseppe Attardi's ECL
40 environment to produce an implementation of the Common-Lisp language
41 which complies to the ANSI X3J13 definition of the language.
42
43 build-id ---> %_specver
44
45 ##########################################################################
46
47 %prep
48 if [ -z "%{_buildtmp}" ]; then
49 cat <<EOF >&2
50
51 !!! Required macro is not defined: '_buildtmp'; aborting!
52
53 EOF
54 return 1
55 fi
56 %setup -q -n %{_nv}
57
58 ##########################################################################
59
60 %build
61 %configure \
62 --enable-local-gmp \
63 --with-x \
64 --with-ffi \
65 --with-clos-stream \
66 --with-tcp \
67 --with-cmuformat \
68 # --enable-local-boehm \ # broken
69 # --enable-threads # non-supported still.
70 %{__make}
71
72 ##########################################################################
73
74 %install
75 _r=$RPM_BUILD_ROOT
76 rm -rf $_r
77 %{__installdir} -m 755 $_r
78
79 %{__make} \
80 PREFIX=$_r \
81 install
82
83 [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
84
85 # copy the files in texi/*
86 _d=$_r/%{_docdir}/%{_nv}
87 %{__installdir} -m 755 $_d
88 for i in \
89 build/doc/*.html \
90 src/doc/BUGS \
91 src/doc/todo.txt
92 do
93 %{__install} -m 644 $i $_d
94 done
95
96 for a in ecl ecldev
97 do
98 _d=$_r/%{_docdir}/%{_nv}/$a
99 %{__installdir} -m 755 $_d
100 for i in \
101 build/doc/$a/*.html
102 do
103 %{__install} -m 644 $i $_d
104 done
105 done
106
107 # BUG: the cause of the first problem is in the configure.in which set the
108 # values of libdir, infodir, bindir
109 #(
110 # cd $_r/%{_prefix}
111 # %{__installdir} -m 755 share
112 # %{__mv} man info share
113 #)
114 # BUG: the cause of this problem is an 'install -m 644' that installs "cmp.fas"
115 # with some archive files and lisp files.
116 # find $_r -name "*.fas" | xargs chmod a+x
117
118 ##################################################
119
120 gen_filelist()
121 {
122 _d=$1;shift
123 _l=$1;shift
124 find $_d | perl -nl \
125 -e "\$_d='$_d';" \
126 -e 'if ( ! -d ) { $_f=1; undef $_p; }' \
127 -e 'elsif ( m,$_d.*%{_pkg}, ) { $_f=1; $_p="%dir "; }' \
128 -e 'if ( $_f ) {' \
129 -e ' s,/*$_d/*,/,;' \
130 -e ' printf "%s\n", "$_p$_";' \
131 -e ' undef $_f }' \
132 > $_l
133 }
134
135 gen_filelist $RPM_BUILD_ROOT %{_filelist}
136
137 ##########################################################################
138
139 # add info files to info dir in %post
140 %post
141 for _n in ecl ecldev; do
142 _d=%{_infodir}
143 _f=$_d/$_n.info.gz
144 if [ -f $_f ]; then
145 /sbin/install-info $_f $_d/dir
146 fi
147 done
148 /sbin/ldconfig
149
150 # remove info files from info dir in %postun
151 %postun
152 for _n in ecl ecldev; do
153 _d=%{_infodir}
154 _f=$_d/$_n.info.gz
155 if [ -f $_f ]; then
156 /sbin/install-info --delete $_f $_d/dir
157 fi
158 done
159 /sbin/ldconfig
160
161 ##########################################################################
162
163 %clean
164 #echo The maid is off on `date +%A`.
165 for i in "$RPM_BUILD_ROOT" "$RPM_BUILD_DIR/%{_nv}"; do
166 [ "$i" != "/" ] && rm -rf $i || :
167 done
168
169 ##########################################################################
170
171 %files -f %{_filelist}
172 %defattr(-,root,root)
173
174 ##########################################################################
175
176 %changelog
177 * Wed Oct 23 2003 Juanjo <[email protected]>
178 - Ported to Suse and integrated in the ECL distribution.
179
180 * Mon Oct 20 2003 Robert Lehr <[email protected]>
181 - consolidated texi/info patches
182 - added build-dependency on gmp-devel
183 - changed group to Development/Languages/Lisp
184 - added _buildtmp definition for public use
185 - added rpm-build build dependency
186
187 * Fri Oct 10 2003 Robert Lehr <[email protected]>
188 - wrote private spec file for ECL v0.9b