| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- ##
- ## prince.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2015 OpenPKG Foundation e.V. <http://openpkg.net/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package version
- %define V_openpkg 10r4
- %define V_freebsd 10r4
- %define V_linux 10r4
- %define V_solaris 10r4
- %define V_macosx 10r4
- # package information
- Name: prince
- Summary: Professional XML to PDF Renderer
- URL: http://www.princexml.com/
- Vendor: YesLogic Pty. Ltd.
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: EVAL
- Group: Typesetting
- License: Commercial
- Version: %{V_openpkg}
- Release: 20150828
- # list of sources
- Source0: http://www.princexml.com/download/prince-%{V_freebsd}-freebsd10.1-amd64-static.tar.gz
- Source1: http://www.princexml.com/download/prince-%{V_linux}-debian8.0-amd64.tar.gz
- Source2: http://www.princexml.com/download/prince-%{V_solaris}-sol11x86.tar.gz
- Source3: http://www.princexml.com/download/prince-%{V_macosx}-macosx.tar.gz
- Source4: prince.sh
- Source5: prince.txt
- # build information
- BuildPreReq: OpenPKG, openpkg >= 20140101
- PreReq: OpenPKG, openpkg >= 20140101, fonts-free
- %description
- Prince is a commercial program that converts XML and HTML into PDF
- documents. Prince can read many XML formats, including XHTML and
- SVG. Prince formats documents according to style sheets written in
- CSS.
- %track
- prog prince = {
- version = %{V_linux}
- url = http://www.princexml.com/download/
- regex = prince-(__VER__)-linux-static\.tar\.gz
- }
- %prep
- %setup -q -T -c
- %build
- # unpack platform-specific distribution
- case "%{l_platform -t}" in
- *-freebsd* ) source="%{SOURCE0}" ;;
- *-linux* ) source="%{SOURCE1}" ;;
- *-sunos* ) source="%{SOURCE2}" ;;
- *-darwin* ) source="%{SOURCE3}" ;;
- * ) echo "Sorry, platform %{l_platform -t} not supported" 1>&2; exit 1 ;;
- esac
- %{l_gzip} -d -c $source | %{l_tar} xf -
- %install
- # create installation hierarchy
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/etc/prince \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/prince \
- $RPM_BUILD_ROOT%{l_prefix}/lib/prince
- # install command line wrapper
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE prince.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/prince
- # install program
- %{l_shtool} install -c -m 755 \
- prince-*/lib/prince/bin/prince \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/prince/
- rm -rf prince-*/lib/prince/bin
- # install license file
- %{l_shtool} install -c -m 644 \
- prince-*/lib/prince/license/license.dat \
- $RPM_BUILD_ROOT%{l_prefix}/etc/prince/
- ln -s \
- ../../etc/prince \
- $RPM_BUILD_ROOT%{l_prefix}/lib/prince/license
- rm -rf prince-*/lib/prince/license
- # install data
- cp -rp prince-*/lib/prince/* \
- $RPM_BUILD_ROOT%{l_prefix}/lib/prince/
- # extend fonts.css for finding standard fonts
- for name in `grep "^<file" %{SOURCE prince.txt} | sed -e 's;^.*name=";;' -e 's;".*$;;'`; do
- (echo ""; cat %{SOURCE prince.txt}; echo "") |\
- sed -e "1,/^<file name=\"$name\">/d" -e "/<\/file>/,\$d" >$name
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- $name $RPM_BUILD_ROOT%{l_prefix}/lib/prince/style/$name
- done
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%config %{l_prefix}/etc/prince/*'
- %files -f files
- %clean
|