m4/m4.spec

Mon, 18 Oct 2010 11:18:47 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 18 Oct 2010 11:18:47 +0200
changeset 267
1eb3a915673d
child 268
510babc166c1
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

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

mercurial