|
|
@@ -33,16 +33,18 @@ Distribution: OpenPKG [EVAL]
|
|
|
Group: XWindow
|
|
|
License: GPL
|
|
|
Version: 3.5.8
|
|
|
-Release: 20020926
|
|
|
+Release: 20021017
|
|
|
|
|
|
# list of sources
|
|
|
Source0: ftp://ftpthep.physik.uni-mainz.de/pub/gv/unix/gv-%{version}.tar.gz
|
|
|
+Source1: gv.sh
|
|
|
+Patch0: gv.patch
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
-BuildPreReq: OpenPKG, openpkg >= 20020206, X11, ghostscript
|
|
|
-PreReq: OpenPKG, openpkg >= 20020206, X11, ghostscript
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20020206, X11, xaw3d, ghostscript
|
|
|
+PreReq: OpenPKG, openpkg >= 20020206, X11, xaw3d, ghostscript
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
|
|
|
@@ -54,15 +56,29 @@ AutoReqProv: no
|
|
|
version 1.5.
|
|
|
|
|
|
%prep
|
|
|
- %setup0 -q
|
|
|
+ %setup -q
|
|
|
+ %patch -p1
|
|
|
|
|
|
%build
|
|
|
- # build gv
|
|
|
- PATH=$PATH:`%{l_prefix}/etc/rc --query x11_bindir`
|
|
|
- xmkmf
|
|
|
- %{l_make} Makefiles
|
|
|
+ # workaround problems with macros on #include commands
|
|
|
+ %{l_shtool} subst \
|
|
|
+ -e 's;\(include[ ]*\)INC_X11(\([^)]*\));\1<X11/\2>;g' \
|
|
|
+ -e 's;\(include[ ]*\)INC_XMU(\([^)]*\));\1<X11/Xmu/\2>;g' \
|
|
|
+ -e 's;\(include[ ]*\)INC_XAW(\([^)]*\));\1<X11/Xaw3d/\2>;g' \
|
|
|
+ `find . -name "*.[ch]" -print`
|
|
|
+
|
|
|
+ # workaround trouble with manpage building
|
|
|
cp doc/gv.man source/gv.man
|
|
|
- %{l_make}
|
|
|
+
|
|
|
+ # make sure OpenPKG Xaw3d is found
|
|
|
+ %{l_shtool} subst \
|
|
|
+ -e 's;^\(DEFINES[ ]*=\)\(.*\);\1 -I%{l_prefix}/include \2;' \
|
|
|
+ source/Imakefile
|
|
|
+
|
|
|
+ # generate Makefiles and build gv
|
|
|
+ PATH=$PATH:`%{l_prefix}/etc/rc --query x11_bindir`
|
|
|
+ xmkmf -a
|
|
|
+ %{l_make} %{l_mflags}
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
@@ -70,16 +86,28 @@ AutoReqProv: no
|
|
|
# create hierarchy
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/man/man1
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/libexec/gv \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/share/gv
|
|
|
|
|
|
# install gv
|
|
|
%{l_shtool} install -c -s -m 755 \
|
|
|
- source/gv $RPM_BUILD_ROOT%{l_prefix}/bin/
|
|
|
+ source/gv $RPM_BUILD_ROOT%{l_prefix}/libexec/gv/
|
|
|
|
|
|
# install manpages
|
|
|
- %{l_shtool} install -c -m 444 \
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
doc/gv.man $RPM_BUILD_ROOT%{l_prefix}/man/man1/gv.1
|
|
|
|
|
|
+ # install application resource
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ -e 's;\(:[ ]*\)\(gs\);\1%{l_prefix}/bin/\2;' \
|
|
|
+ source/GV.ad $RPM_BUILD_ROOT%{l_prefix}/share/gv/GV.ad
|
|
|
+
|
|
|
+ # install executable wrapper
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
+ -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
+ %{SOURCE gv.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/gv
|
|
|
+
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
|
|
|
|
%files -f files
|