Browse Source

Redirect buildfiles as well as installation, add build and runtime prerequisites, remove unused l_prefix substitution, correct version substitution, and do not package unused and generated files.

Michael Schloh von Bennewitz 23 years ago
parent
commit
f1be5fd460
1 changed files with 18 additions and 10 deletions
  1. 18 10
      openpkg-tool/openpkg-tool.spec

+ 18 - 10
openpkg-tool/openpkg-tool.spec

@@ -40,14 +40,13 @@ Source0:      openpkg.sh
 Source1:      openpkg-index.pl
 Source2:      openpkg-build.pl
 Source3:      openpkg.pod
-Source4:      openpkg.1
-Source5:      Makefile
+Source4:      Makefile
 
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20020206
-PreReq:       OpenPKG, openpkg >= 20020206
+BuildPreReq:  OpenPKG, openpkg >= 20020206, make, perl
+PreReq:       OpenPKG, openpkg >= 20020206, perl
 AutoReq:      no
 AutoReqProv:  no
 
@@ -55,8 +54,19 @@ AutoReqProv:  no
     The OpenPKG tool is a helper utility for managing an OpenPKG instance.
 
 %prep
+    %setup -c -T
+    cp -f %{SOURCE0} .
+    cp -f %{SOURCE1} .
+    cp -f %{SOURCE2} .
+    cp -f %{SOURCE3} .
+    cp -f %{SOURCE4} .
 
 %build
+    %{l_shtool} subst \
+        -e 's;@l_prefix@;%{l_prefix};g' \
+        -e 's;@version@;%{version};g' \
+        openpkg.pod
+    %{l_make} %{l_mflags}
 
 %install
     rm -rf $RPM_BUILD_ROOT
@@ -67,18 +77,16 @@ AutoReqProv:  no
     %{l_shtool} install -c -m 755 \
         -e 's;@l_prefix@;%{l_prefix};g' \
         -e 's;@version@;%{version};g' \
-        %{SOURCE openpkg.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/openpkg
+        openpkg.sh $RPM_BUILD_ROOT%{l_prefix}/bin/openpkg
     %{l_shtool} install -c -m 644 \
-        -e 's;@l_prefix@;%{l_prefix};g' \
-        -e 's;@version@;%{version};g' \
-        %{SOURCE openpkg.1} $RPM_BUILD_ROOT%{l_prefix}/man/man1/
+        openpkg.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
     %{l_shtool} install -c -m 755 \
         -e 's;@l_prefix@;%{l_prefix};g' \
-        %{SOURCE openpkg-index.pl} \
+        openpkg-index.pl \
         $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/
     %{l_shtool} install -c -m 755 \
         -e 's;@l_prefix@;%{l_prefix};g' \
-        %{SOURCE openpkg-build.pl} \
+        openpkg-build.pl \
         $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
         %{l_files_std} \