File cvstrac.spec of Package cvstrac
#
# spec file for package cvstrac (Version 2.0.1)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
# usedforbuild aaa_base acl attr audit-libs bash coreutils cpio cpp cpp42 cracklib cvs diffutils file filesystem fillup findutils gawk gdbm gettext-devel glibc glibc-devel glibc-locale grep groff gzip info insserv less libacl libattr libbz2-1 libbz2-devel libdb-4_5 libgcc42 libltdl-3 libmudflap42 libstdc++42 libvolume_id libxcrypt libzio linux-kernel-headers m4 make man mktemp ncurses net-tools netcfg pam pam-modules patch perl-base permissions popt readline rpm sed sysvinit tar texinfo timezone util-linux zlib autoconf automake binutils bzip2 gcc gcc42 gettext libtool perl sqlite-devel
Name: cvstrac
BuildRequires: sqlite-devel
License: gpl
Group: Development/Libraries
Autoreqprov: on
Version: 2.0.1_cvs20070720
Release: 0
Summary: Trac for cvs git
Url: http://www.cvstrac.org
Source0: %{name}-%{version}.tar.bz2
Source1: cvstrac
Source2: sysconfig.cvstrac
Source3: README.cvstrac
Source4: diff2html.awk
Source5: 1_redheader.gif
Source6: 2_whitestripes.gif
Source7: 3_redbutton.gif
Source8: 4_orangebutton.gif
Source9: 5_whitebutton.gif
Patch0: installationpath.patch
Patch1: diff2html-filter-for-git-as-default.patch
Patch2: extend-css.patch
Patch3: diff2html-improvements.patch
Patch100: test.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#BuildArchitectures: noarch
#ExclusiveArch: %ix86
PreReq: %fillup_prereq
%define installdir /srv/www/cgi-bin
%description
Features
* Automatically generates a patch-set log from check-in comments
* User-defined color-coded database queries
* Web-based administration of the CVSROOT/passwd file
* Built-in repository browser
* Built-in Wiki
* Very simple setup - a self-contained executable runs as CGI, from inetd, or as a stand-alone web server
* Minimal memory, disk and CPU requirements - works on old hardware
* Access permissions configurable separately for each user
* Allows for anonymous users
* Uses a built-in SQL database engine (SQLite) - no external RDBMS required
* Tested under Linux - works on other versions of Unix. Also works under Windows
* Can be run from a chroot jail for added security.
* GNU Public License
%package -n diff2html-awk
Summary: Creates html formatted side-by-side diffs from normal diff output
Group: Development/Libraries
Requires: awk
%description -n diff2html-awk
Creates html formatted side-by-side diffs from normal diff output. Uses for this.
%package -n svntrac
Summary: A Web-Based Bug And Patch-Set Tracking System For CVS, Subversion and GIT
Group: Development/Libraries
%description -n svntrac
Features
* Automatically generates a patch-set log from check-in comments
* User-defined color-coded database queries
* Web-based administration of the CVSROOT/passwd file
* Built-in repository browser
* Built-in Wiki
* Very simple setup - a self-contained executable runs as CGI, from inetd, or as a stand-alone web server
* Minimal memory, disk and CPU requirements - works on old hardware
* Access permissions configurable separately for each user
* Allows for anonymous users
* Uses a built-in SQL database engine (SQLite) - no external RDBMS required
* Tested under Linux - works on other versions of Unix. Also works under Windows
* Can be run from a chroot jail for added security.
* GNU Public License
%package -n gittrac
Summary: A Web-Based Bug And Patch-Set Tracking System For CVS, Subversion and GIT
Group: Development/Libraries
Requires: diff2html-awk
%description -n gittrac
Features
* Automatically generates a patch-set log from check-in comments
* User-defined color-coded database queries
* Web-based administration of the CVSROOT/passwd file
* Built-in repository browser
* Built-in Wiki
* Very simple setup - a self-contained executable runs as CGI, from inetd, or as a stand-alone web server
* Minimal memory, disk and CPU requirements - works on old hardware
* Access permissions configurable separately for each user
* Allows for anonymous users
* Uses a built-in SQL database engine (SQLite) - no external RDBMS required
* Tested under Linux - works on other versions of Unix. Also works under Windows
* Can be run from a chroot jail for added security.
* GNU Public License
%prep
%setup
cp %{SOURCE4} .
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
#%patch100 -p1
sed -i -e "s|SRCDIR = .*|SRCDIR = $(pwd)|g" -e "s|BCC = .*|BCC = gcc $RPM_OPT_FLAGS -g|g" -e "s|INSTALLDIR = .*|INSTALLDIR = $RPM_BUILD_ROOT/%{_bindir}|g" linux-gcc.mk
%build
make -f linux-gcc.mk
%install
cp %{SOURCE1} .
cp %{SOURCE2} .
cp %{SOURCE3} .
cat %{SOURCE1} | sed -e 's/cvs/svn/' -e 's/CVS/SVN/g' > svntrac
cat %{SOURCE2} | sed -e 's/cvs/svn/' -e 's/CVS/SVN/g' > sysconfig.svntrac
cat %{SOURCE3} | sed -e 's/cvs/svn/' -e 's/CVS/SVN/g' > README.svntrac
cat %{SOURCE1} | sed -e 's/cvs/git/' -e 's/CVS/GIT/g' > gittrac
cat %{SOURCE2} | sed -e 's/cvs/git/' -e 's/CVS/GIT/g' > sysconfig.gittrac
cat %{SOURCE3} | sed -e 's/cvs/git/' -e 's/CVS/GIT/g' > README.gittrac
mv cvstrac svntrac gittrac %{_builddir}
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
cp diff2html.awk $RPM_BUILD_ROOT/%{_bindir}
make -f linux-gcc.mk APPNAME=gittrac install
make -f linux-gcc.mk APPNAME=cvstrac install
make -f linux-gcc.mk APPNAME=svntrac install
mkdir -p $RPM_BUILD_ROOT%{_var}/adm/fillup-templates/
install -m 644 sysconfig.* $RPM_BUILD_ROOT%{_var}/adm/fillup-templates/
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
pushd %{_builddir}
cp svntrac gittrac cvstrac $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
popd
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
for file in svntrac gittrac cvstrac
do
ln -sf %{_sysconfdir}/init.d/${file} $RPM_BUILD_ROOT/%{_sbindir}/rc${file}
done
%post
%{fillup_only}
%post -n svntrac
%{fillup_only -n svntrac}
%post -n gittrac
%{fillup_only -n gittrac}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README.cvstrac
%{_var}/adm/fillup-templates/sysconfig.cvstrac
%defattr(755,root,root)
%{_sbindir}/rccvstrac
%{_sysconfdir}/init.d/cvstrac
%{_bindir}/cvstrac
%files -n gittrac
%defattr(-,root,root)
%doc README.gittrac
%{_var}/adm/fillup-templates/sysconfig.gittrac
%defattr(755,root,root)
%{_sbindir}/rcgittrac
%{_sysconfdir}/init.d/gittrac
%{_bindir}/gittrac
%files -n svntrac
%defattr(-,root,root)
%doc README.svntrac
%{_var}/adm/fillup-templates/sysconfig.svntrac
%defattr(755,root,root)
%{_sbindir}/rcsvntrac
%{_sysconfdir}/init.d/svntrac
%{_bindir}/svntrac
%files -n diff2html-awk
%defattr(755,root,root)
%{_bindir}/diff2html.awk