Преглед на файлове

upgrade to the latest stable version

Ralf S. Engelschall преди 24 години
родител
ревизия
0800de72f5
променени са 1 файла, в които са добавени 33 реда и са изтрити 7 реда
  1. 33 7
      inn/inn.spec

+ 33 - 7
inn/inn.spec

@@ -22,6 +22,10 @@
 ##  SUCH DAMAGE. 
 ##  
 
+%define       V_build    stable
+%define       V_release  2.3.2
+%define       V_stable   20011016
+
 #   package information
 Name:         inn
 Summary:      InterNetNews Usenet Server
@@ -31,13 +35,18 @@ Packager:     The OpenPKG Project
 Distribution: OpenPKG [EXP]
 Group:        News
 License:      ISC
-Version:      2.3.2
-Release:      9
+%if "%{V_build}" == "release"
+Version:      %{V_release}
+%else
+Version:      %{V_release}.%{V_stable}
+%endif
+Release:      0
 
 #   list of sources
-Source0:      ftp://ftp.isc.org/isc/inn/inn-%{version}.tar.gz
-Source1:      ftp://ftp.openpkg.org/DST/inn/fakesyslog.tar.gz
-Source2:      rc.inn
+Source0:      ftp://ftp.openpkg.org/DST/inn/fakesyslog.tar.gz
+Source1:      ftp://ftp.isc.org/isc/inn/inn-%{V_release}.tar.gz
+Source2:      ftp://ftp.isc.org/isc/inn/snapshots/inn-STABLE-%{V_stable}.tar.gz
+Source3:      rc.inn
 
 #   build information
 Prefix:       %{l_prefix}
@@ -54,7 +63,11 @@ AutoReqProv:  no
 
 %prep
     %setup0 -q -c
+%if "%{V_build}" == "release"
     %setup1 -q -T -D -a 1
+%else
+    %setup2 -q -T -D -a 2
+%endif
 
 %build
     #   make sure INN finds our own files
@@ -71,8 +84,13 @@ AutoReqProv:  no
       %{l_make} %{l_mflags} 
     )
 
+%if "%{V_build}" == "release"
+    cd inn-%{V_release}
+%else
+    cd inn-STABLE-%{V_stable}
+%endif
+
     #   adjust some too strange INN paths
-    cd inn-%{version}
     %{l_rpmtool} subst \
         "s;^\\(PATHBIN.*=\\).*;\\1 \$(PATHNEWS)/libexec/inn;" \
         -- Makefile.global.in
@@ -109,7 +127,12 @@ AutoReqProv:  no
 
 %install
     rm -rf $RPM_BUILD_ROOT
-    cd inn-%{version}
+
+%if "%{V_build}" == "release"
+    cd inn-%{V_release}
+%else
+    cd inn-STABLE-%{V_stable}
+%endif
 
     #   determine current user and group
     thisuser=`(id -un) 2>/dev/null ||\
@@ -177,6 +200,9 @@ AutoReqProv:  no
       chmod 644 history*
     )
 
+    #   adjust permissions
+    chmod 664 $RPM_BUILD_ROOT%{l_prefix}/var/inn/db/active
+
     #   create empty logfiles
     touch $RPM_BUILD_ROOT%{l_prefix}/var/inn/log/news.log