m4/m4.spec

changeset 267
1eb3a915673d
child 268
510babc166c1
equal deleted inserted replaced
-1:000000000000 0:557a50e170e4
1 ##
2 ## m4.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
23
24 # package information
25 Name: m4
26 Summary: Macro Processing Language
27 URL: http://www.gnu.org/software/m4/
28 Vendor: Rene Seindal et al.
29 Packager: OpenPKG Foundation e.V.
30 Distribution: OpenPKG Community
31 Class: CORE
32 Group: MacroProcessor
33 License: GPL
34 Version: 1.4.15
35 Release: 20100901
36
37 # list of sources
38 Source0: ftp://ftp.gnu.org/gnu/m4/m4-%{version}.tar.gz
39
40 # build information
41 BuildPreReq: OpenPKG, openpkg >= 20100101, make
42 PreReq: OpenPKG, openpkg >= 20100101
43
44 %description
45 GNU m4 is an implementation of the traditional UNIX macro processor.
46 It is mostly SVR4 compatible, although it has some extensions (for
47 example, handling more than 9 positional parameters to macros).
48 m4 also has builtin functions for including files, running shell
49 commands, doing arithmetic, etc.
50
51 %track
52 prog m4 = {
53 version = %{version}
54 url = ftp://ftp.gnu.org/gnu/m4/
55 regex = m4-(__VER__)\.tar\.gz
56 }
57
58 %prep
59 %setup -q
60
61 %build
62 # configure package
63 CC="%{l_cc}" \
64 CFLAGS="%{l_cflags -O}" \
65 GREP="grep" \
66 ./configure \
67 --prefix=%{l_prefix} \
68 --libdir=%{l_prefix}/lib/m4 \
69 --datarootdir=%{l_prefix}
70
71 # build package
72 %{l_make} %{l_mflags}
73
74 %install
75
76 # install package
77 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
78
79 # provide alternative GNU names
80 ln $RPM_BUILD_ROOT%{l_prefix}/bin/m4 \
81 $RPM_BUILD_ROOT%{l_prefix}/bin/gm4
82 ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/m4.1 \
83 $RPM_BUILD_ROOT%{l_prefix}/man/man1/gm4.1
84
85 # strip down installation
86 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
87 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
88 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/m4/charset.alias
89 rmdir $RPM_BUILD_ROOT%{l_prefix}/lib/m4 >/dev/null 2>&1 || true
90
91 # determine installation files
92 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
93
94 %files -f files
95
96 %clean
97

mercurial