OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 07-Feb-2006 08:50:58 Branch: HEAD Handle: 2006020707505800 Modified files: openpkg-src/viewvc viewvc.patch viewvc.spec Log: cleanup packaging and fix location of config files Summary: Revision Changes Path 1.2 +9 -0 openpkg-src/viewvc/viewvc.patch 1.3 +39 -18 openpkg-src/viewvc/viewvc.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/viewvc/viewvc.patch ============================================================================ $ cvs diff -u -r1.1 -r1.2 viewvc.patch --- openpkg-src/viewvc/viewvc.patch 11 Jan 2006 19:31:12 -0000 1.1 +++ openpkg-src/viewvc/viewvc.patch 7 Feb 2006 07:50:58 -0000 1.2 @@ -21,6 +21,15 @@ ## list of files for installation +@@ -75,7 +75,7 @@ + ("lib/PyFontify.py", "lib/PyFontify.py", 0644, 0, 0, 1), + ("lib/blame.py", "lib/blame.py", 0644, 0, 0, 1), + ("lib/compat.py", "lib/compat.py", 0644, 0, 0, 1), +- ("lib/config.py", "lib/config.py", 0644, 0, 0, 1), ++ ("lib/config.py", "lib/config.py", 0644, 1, 0, 1), + ("lib/cvsdb.py", "lib/cvsdb.py", 0644, 1, 0, 1), + ("lib/dbi.py", "lib/dbi.py", 0644, 0, 0, 1), + ("lib/debug.py", "lib/debug.py", 0644, 0, 0, 1), @@ -159,6 +160,8 @@ def InstallFile(src_path, dest_path, mode, set_python_paths, prompt_replace, compile_it): @@ . patch -p0 <<'@@ .' Index: openpkg-src/viewvc/viewvc.spec ============================================================================ $ cvs diff -u -r1.2 -r1.3 viewvc.spec --- openpkg-src/viewvc/viewvc.spec 13 Jan 2006 08:00:31 -0000 1.2 +++ openpkg-src/viewvc/viewvc.spec 7 Feb 2006 07:50:58 -0000 1.3 @@ -22,7 +22,9 @@ ## SUCH DAMAGE. ## -# FIXME: rse: the configuration files are not located under etc/viewvc/ and not tagged %config +# package version +%define V_dist 0.9.4 +%define V_subdir 3330/27671 # package information Name: viewvc @@ -34,22 +36,21 @@ Class: EVAL Group: Web License: BSD -Version: 0.9.4 -Release: 20060113 +Version: %{V_dist} +Release: 20060207 # package options %option with_cvsgraph no # list of sources -Source0: http://viewvc.tigris.org/files/documents/3330/27671/viewcvs-%{version}.tar.gz +Source0: http://viewvc.tigris.org/files/documents/%{V_subdir}/viewcvs-%{V_dist}.tar.gz Patch0: viewvc.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20040130, python -PreReq: OpenPKG, openpkg >= 20040130 -PreReq: diffutils, rcs, python, enscript +PreReq: OpenPKG, openpkg >= 20040130, python, diffutils, rcs, enscript %if "%{with_cvsgraph}" == "yes" PreReq: cvsgraph %endif @@ -67,27 +68,32 @@ %track prog viewvc = { - version = %{version} - url = http://www.viewvc.tigris.org/files/documents/3330/27671/ - regex = view(vc|cvs)-(__VER__)\.tar\.gz + version = %{V_dist} + url = http://viewvc.tigris.org/servlets/ProjectDocumentList?folderID=6004 + regex = /files/documents/\d+/\d+/view(?:vc|cvs)-(__VER__)\.tar\.gz + } + prog viewvc:subdir = { + version = %{V_subdir} + url = http://viewvc.tigris.org/servlets/ProjectDocumentList?folderID=6004 + regex = /files/documents/(\d+/\d+)/view(?:vc|cvs)-__VER__\.tar\.gz } %prep - %setup -q -n viewcvs-%{version} + %setup -q -n viewcvs-%{V_dist} %patch -p0 %build %{l_shtool} subst \ - -e "s,@RPM_BUILD_ROOT@,$RPM_BUILD_ROOT," \ + -e "s;@RPM_BUILD_ROOT@;$RPM_BUILD_ROOT;" \ viewcvs-install %{l_shtool} subst \ - -e "s,^use_enscript =.*,use_enscript = 1," \ - -e "s,^enscript_path =.*,enscript_path = %{l_prefix}/bin/," \ + -e "s;^use_enscript =.*;use_enscript = 1;" \ + -e "s;^enscript_path =.*;enscript_path = %{l_prefix}/bin/;" \ cgi/viewcvs.conf.dist %if "%{with_cvsgraph}" == "yes" %{l_shtool} subst \ - -e "s,^use_cvsgraph =.*,use_cvsgraph = 1," \ - -e "s,^cvsgraph_path =.*,cvsgraph_path = %{l_prefix}/bin/," \ + -e "s;^use_cvsgraph =.*;use_cvsgraph = 1;" \ + -e "s;^cvsgraph_path =.*;cvsgraph_path = %{l_prefix}/bin/;" \ cgi/viewcvs.conf.dist %endif @@ -96,9 +102,24 @@ %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/share/viewvc echo "%{l_prefix}/share/viewvc" | ./viewcvs-install - mv $RPM_BUILD_ROOT%{l_prefix}/share/viewvc/cgi \ - $RPM_BUILD_ROOT%{l_prefix}/cgi - %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + for py in $RPM_BUILD_ROOT%{l_prefix}/share/viewvc/lib/*.py; do + %{l_shtool} subst -q \ + -e 's;%{l_prefix}/share/viewvc/viewcvs\.conf;%{l_prefix}/etc/viewvc/viewcvs.conf;g' \ + -e 's;%{l_prefix}/share/viewvc/cvsgraph\.conf;%{l_prefix}/etc/viewvc/cvsgraph.conf;g' \ + $py + eval "%{l_prefix}/bin/python -c 'import py_compile; py_compile.compile(\"$py\")'" + done + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/viewvc + mv $RPM_BUILD_ROOT%{l_prefix}/share/viewvc/viewcvs.conf \ + $RPM_BUILD_ROOT%{l_prefix}/etc/viewvc/viewcvs.conf + mv $RPM_BUILD_ROOT%{l_prefix}/share/viewvc/cvsgraph.conf \ + $RPM_BUILD_ROOT%{l_prefix}/etc/viewvc/cvsgraph.conf + mv $RPM_BUILD_ROOT%{l_prefix}/share/viewvc/cgi \ + $RPM_BUILD_ROOT%{l_prefix}/cgi + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ + %{l_files_std} \ + '%config %{l_prefix}/etc/viewvc/*' %files -f files @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org