فهرست منبع

since version 2.0 CVSTrac is actually SVNTrac and GITTrac, too. So for a SVN-only installation do not require RCS and CVS. Same for GIT. Let CVSTrac by default only be CVSTrac now

Ralf S. Engelschall 19 سال پیش
والد
کامیت
d30c024be6
1فایلهای تغییر یافته به همراه40 افزوده شده و 6 حذف شده
  1. 40 6
      cvstrac/cvstrac.spec

+ 40 - 6
cvstrac/cvstrac.spec

@@ -33,7 +33,12 @@ Class:        BASE
 Group:        SCM
 License:      GPL
 Version:      2.0.1
-Release:      20070129
+Release:      20070214
+
+#   package options
+%option       with_cvs  yes
+%option       with_svn  no
+%option       with_git  no
 
 #   list of sources
 Source0:      http://www.cvstrac.org/cvstrac-%{version}.tar.gz
@@ -44,7 +49,16 @@ Patch0:       cvstrac.patch
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
 BuildPreReq:  OpenPKG, openpkg >= 20040130, make, gcc
-PreReq:       OpenPKG, openpkg >= 20040130, cvs, rcs
+PreReq:       OpenPKG, openpkg >= 20040130
+%if "%{with_cvs}" == "yes"
+PreReq:       cvs, rcs
+%endif
+%if "%{with_svn}" == "yes"
+PreReq:       subversion
+%endif
+%if "%{with_git}" == "yes"
+PreReq:       git
+%endif
 BuildPreReq:  sqlite >= 3.2
 PreReq:       sqlite >= 3.2
 AutoReq:      no
@@ -73,7 +87,17 @@ AutoReqProv:  no
     case "%{l_platform -t}" in
         *-sunos* ) libs="$libs -lrt -lsocket -lnsl" ;;
     esac
-    for scm in cvs svn git; do
+    for scm in \
+%if "%{with_cvs}" == "yes"
+        cvs \
+%endif
+%if "%{with_svn}" == "yes"
+        svn \
+%endif
+%if "%{with_git}" == "yes"
+        git \
+%endif
+    ; do
         %{l_make} %{l_mflags} -f main.mk \
             SRCDIR=`pwd` \
             BCC="%{l_cc} %{l_cflags -O} %{l_cppflags}" \
@@ -88,9 +112,19 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/bin \
         $RPM_BUILD_ROOT%{l_prefix}/cgi \
         $RPM_BUILD_ROOT%{l_prefix}/var/cvstrac
-    %{l_shtool} install -c -s -m 755 \
-        cvstrac svntrac gittrac $RPM_BUILD_ROOT%{l_prefix}/bin/
-    for scm in cvs svn git; do
+    for scm in \
+%if "%{with_cvs}" == "yes"
+        cvs \
+%endif
+%if "%{with_svn}" == "yes"
+        svn \
+%endif
+%if "%{with_git}" == "yes"
+        git \
+%endif
+    ; do
+        %{l_shtool} install -c -s -m 755 \
+            ${scm}trac $RPM_BUILD_ROOT%{l_prefix}/bin/
         %{l_shtool} install -c -m 755 %{l_value -s -a} \
             -e "s;@l_scm@;${scm};g" \
             %{SOURCE cvstrac.cgi} $RPM_BUILD_ROOT%{l_prefix}/cgi/${scm}trac