| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- ##
- ## xfig.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
- ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
- ##
- ## 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 information
- Name: xfig
- Summary: Interactive Drawing Tool
- URL: http://www.xfig.org/
- Vendor: Brian V. Smith et al.
- Packager: The OpenPKG Project
- Distribution: OpenPKG [EVAL]
- Group: XWindow
- License: MIT-style
- Version: 3.2.4
- Release: 20030425
- # list of sources
- Source0: http://www.xfig.org/xfigdist/xfig.%{version}.code_only.tar.gz
- Source1: xfig.sh
- Patch0: xfig.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20021204, X11, make, gcc, zlib, jpeg, png, xpm, xaw3d
- PreReq: OpenPKG, openpkg >= 20021204, X11, transfig
- AutoReq: no
- AutoReqProv: no
- %description
- xfig is an X Window System tool for creating basic vector graphics,
- including bezier curves, lines, rulers and more. The resulting
- graphics can be saved, printed on PostScript printers or converted
- to a variety of other formats (e.g., X11 bitmaps, Encapsulated
- PostScript, LaTeX).
- %prep
- %setup -q -n xfig.%{version}
- %patch -p0
- %build
- # configure package
- X11BINDIR=`%{l_prefix}/etc/rc --query x11_bindir`
- %{l_shtool} subst \
- -e 's;^XCOMM \(BINDIR =\).*$;\1 %{l_prefix}/libexec/xfig;' \
- -e "s;^XCOMM \\(MKDIRHIER =\\).*\$;\\1 $X11BINDIR/mkdirhier;" \
- -e 's;^XCOMM \(XAPPLOADDIR =\) .*$;\1 %{l_prefix}/etc/X11/app-defaults;' \
- -e 's;^\(XFIGLIBDIR =\) .*$;\1 %{l_prefix}/lib/X11/xfig;' \
- -e 's;^\(PNGLIBDIR =\) .*$;\1 %{l_prefix}/lib;' \
- -e 's;^\(PNGINC =\) .*$;\1 -I%{l_prefix}/include/libpng;' \
- -e 's;^\(JPEGLIBDIR =\) .*$;\1 %{l_prefix}/lib;' \
- -e 's;^\(JPEGINC =\) .*$;\1 -I%{l_prefix}/include;' \
- -e 's;^XCOMM \(#define USEXPM\)$;\1;' \
- -e 's;^XCOMM \(#define USEXPM_ICON\)$;\1;' \
- -e 's;^\(XPMLIBDIR =\) .*$;\1 %{l_prefix}/lib;' \
- -e 's;^\(XPMINC =\) .*$;\1 -I%{l_prefix}/include/X11;' \
- -e 's;^XCOMM \(#define XAW3D\)$;\1;' \
- -e 's;^\(XAW3DINC =\) .*$;\1 -I%{l_prefix}/include/X11/Xaw3d;' \
- -e 's;^\(#define I18N\)$;XCOMM \1;' \
- -e 's;^XCOMM \(USEINLINE = .*\)$;\1;' \
- Imakefile
- echo "DESTDIR = \"$RPM_BUILD_ROOT\"" >>Imakefile
- X11BINDIR="`%{l_prefix}/etc/rc --query x11_bindir`"
- PATH="$PATH:$X11BINDIR"
- $X11BINDIR/xmkmf -a
- # build binaries
- %{l_make} %{l_mflags -O} xfig
- %install
- rm -rf $RPM_BUILD_ROOT
- # install binaries
- %{l_make} install
- # install shell wrapper script
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin
- %{l_shtool} install -c -m 755 \
- -e 's;@l_prefix@;%{l_prefix};g' \
- %{SOURCE xfig.sh} \
- $RPM_BUILD_ROOT%{l_prefix}/bin/xfig
- # strip binaries
- strip $RPM_BUILD_ROOT%{l_prefix}/libexec/xfig/* >/dev/null 2>&1 || true
- # rearrange X11 application defaults
- ( cd $RPM_BUILD_ROOT%{l_prefix}/etc/X11/app-defaults
- chmod u+rw Fig Fig-color
- %{l_shtool} install -m 644 \
- Fig Fig-classic
- %{l_shtool} install -m 644 \
- -e 's;^\(#include \)"Fig"$;\1"Fig-classic";' \
- Fig-color Fig
- rm -f Fig-color
- )
- # generate file list
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
- '%not %dir %{l_prefix}/etc/X11' \
- '%not %dir %{l_prefix}/etc/X11/app-defaults' \
- '%not %dir %{l_prefix}/lib/X11' \
- '%config %{l_prefix}/etc/X11/app-defaults/*'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|