Fri, 10 Aug 2012 14:59:30 +0200
Import package vendor original specs for necessary manipulations.
michael@521 | 1 | ## |
michael@521 | 2 | ## xmlto.spec -- OpenPKG RPM Package Specification |
michael@521 | 3 | ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@521 | 4 | ## |
michael@521 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@521 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@521 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@521 | 8 | ## copies. |
michael@521 | 9 | ## |
michael@521 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@521 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@521 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@521 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@521 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@521 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@521 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@521 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@521 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@521 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@521 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@521 | 21 | ## SUCH DAMAGE. |
michael@521 | 22 | ## |
michael@521 | 23 | |
michael@521 | 24 | # package information |
michael@521 | 25 | Name: xmlto |
michael@521 | 26 | Summary: XML/DocBook and XML/XSL-FO Converter |
michael@521 | 27 | URL: http://cyberelk.net/tim/xmlto/ |
michael@521 | 28 | Vendor: Tim Waugh |
michael@521 | 29 | Packager: OpenPKG Foundation e.V. |
michael@521 | 30 | Distribution: OpenPKG Community |
michael@521 | 31 | Class: EVAL |
michael@521 | 32 | Group: XML |
michael@521 | 33 | License: GPL |
michael@521 | 34 | Version: 0.0.20 |
michael@521 | 35 | Release: 20100105 |
michael@521 | 36 | |
michael@521 | 37 | # list of sources |
michael@521 | 38 | Source0: http://cyberelk.net/tim/data/xmlto/stable/xmlto-%{version}.tar.bz2 |
michael@521 | 39 | |
michael@521 | 40 | # build information |
michael@521 | 41 | Prefix: %{l_prefix} |
michael@521 | 42 | BuildRoot: %{l_buildroot} |
michael@521 | 43 | BuildPreReq: OpenPKG, openpkg >= 20040130 |
michael@521 | 44 | PreReq: OpenPKG, openpkg >= 20040130 |
michael@521 | 45 | BuildPreReq: libxml, libxslt, tetex, docbook, getopt, mktemp |
michael@521 | 46 | PreReq: libxml, libxslt, tetex, docbook, getopt, mktemp |
michael@521 | 47 | AutoReq: no |
michael@521 | 48 | AutoReqProv: no |
michael@521 | 49 | |
michael@521 | 50 | %description |
michael@521 | 51 | xmlto converts an XML input format (DocBook or XSL-FO) into a |
michael@521 | 52 | specified output format (PS, PDF, HTML, man, ASCII, XSL-FO, etc.) |
michael@521 | 53 | by applying an appropriate XSL-T stylesheet and then performing |
michael@521 | 54 | whatever post-processing is necessary. |
michael@521 | 55 | |
michael@521 | 56 | %track |
michael@521 | 57 | prog xmlto = { |
michael@521 | 58 | version = %{version} |
michael@521 | 59 | url = http://cyberelk.net/tim/data/xmlto/stable/ |
michael@521 | 60 | regex = xmlto-(\d+\.\d+\.\d+).tar.bz2 |
michael@521 | 61 | } |
michael@521 | 62 | |
michael@521 | 63 | %prep |
michael@521 | 64 | %setup -q |
michael@521 | 65 | %{l_shtool} subst \ |
michael@521 | 66 | -e 's;/bin/bash;@BASH@;g' \ |
michael@521 | 67 | xmlto.in |
michael@521 | 68 | %{l_shtool} subst \ |
michael@521 | 69 | -e 's;/usr/bin/\([a-z0-9\-\.]*\);`which \1`;g' \ |
michael@521 | 70 | format/docbook/txt |
michael@521 | 71 | %{l_shtool} subst \ |
michael@521 | 72 | -e 's;sh \("\$(dirname "\$0")\);%{l_bash} \1;g' \ |
michael@521 | 73 | format/docbook/dvi format/docbook/pdf format/docbook/ps |
michael@521 | 74 | %{l_shtool} subst \ |
michael@521 | 75 | -e 's;bash ;$(BASH) ;g' \ |
michael@521 | 76 | Makefile.in |
michael@521 | 77 | |
michael@521 | 78 | %build |
michael@521 | 79 | CC="%{l_cc}" \ |
michael@521 | 80 | CFLAGS="%{l_cflags -O}" \ |
michael@521 | 81 | CPPFLAGS="%{l_cppflags}" \ |
michael@521 | 82 | LDFLAGS="%{l_ldflags}" \ |
michael@521 | 83 | ./configure \ |
michael@521 | 84 | --prefix=%{l_prefix} \ |
michael@521 | 85 | --mandir=%{l_prefix}/man \ |
michael@521 | 86 | --with-bash=%{l_bash} \ |
michael@521 | 87 | --with-getopt=%{l_prefix}/bin/getopt \ |
michael@521 | 88 | --with-mktemp=%{l_prefix}/bin/mktemp |
michael@521 | 89 | %{l_make} %{l_mflags -O} |
michael@521 | 90 | |
michael@521 | 91 | %install |
michael@521 | 92 | rm -rf $RPM_BUILD_ROOT |
michael@521 | 93 | %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
michael@521 | 94 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@521 | 95 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@521 | 96 | |
michael@521 | 97 | %files -f files |
michael@521 | 98 | |
michael@521 | 99 | %clean |
michael@521 | 100 | rm -rf $RPM_BUILD_ROOT |
michael@521 | 101 |