90 lines
2.0 KiB
RPMSpec
90 lines
2.0 KiB
RPMSpec
%define _prefix /usr
|
|
%define _sysconfdir /etc
|
|
|
|
Summary: Codepot code repository manager
|
|
Name: @PACKAGE_NAME@
|
|
Version: @PACKAGE_VERSION@
|
|
Release: 1
|
|
License: GPL
|
|
Group: Applications/Utilities
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
Requires: httpd php php-ldap php-mysql php-gd subversion subversion-perl mod_dav_svn mod_perl perl perl-LDAP perl-Config-Simple perl-URI perl-DBI perl-Digest-SHA1
|
|
|
|
#BuildRequires:
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
%description
|
|
Codepot code repository manager
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
./configure \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--with-wwwdir=/var/www/html/codepot \
|
|
--with-cfgdir=/etc/codepot \
|
|
--with-depotdir=/var/lib/codepot \
|
|
--with-logdir=/var/log/codepot \
|
|
--with-cachedir=/var/cache/codepot
|
|
make
|
|
|
|
%install
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
|
|
/var/www/html/codepot
|
|
/usr/sbin/codepot-user
|
|
|
|
%config(noreplace) /etc/codepot/codepot.ini
|
|
/etc/codepot/codepot.mysql
|
|
/etc/codepot/codepot.a2ldap
|
|
/etc/codepot/codepot.httpd
|
|
/etc/codepot/start-commit
|
|
/etc/codepot/pre-commit
|
|
/etc/codepot/post-commit
|
|
/etc/codepot/pre-revprop-change
|
|
/etc/codepot/post-revprop-change
|
|
/etc/codepot/cloc.pl
|
|
/etc/codepot/perl/Codepot/AccessHandler.pm
|
|
/etc/codepot/perl/Codepot/AuthenHandler.pm
|
|
|
|
%attr(-,apache,apache) /var/lib/codepot/svnrepo
|
|
%attr(-,apache,apache) /var/lib/codepot/files
|
|
%attr(-,apache,apache) /var/lib/codepot/attachments
|
|
%attr(-,apache,apache) /var/lib/codepot/usericons
|
|
%attr(-,apache,apache) /var/log/codepot
|
|
%attr(-,apache,apache) /var/cache/codepot
|
|
%dir /var/lib/codepot/svnrepo
|
|
%dir /var/lib/codepot/files
|
|
%dir /var/lib/codepot/attachments
|
|
%dir /var/lib/codepot/usericons
|
|
%dir /var/log/codepot
|
|
%dir /var/cache/codepot
|
|
|
|
%pre
|
|
exit 0
|
|
|
|
%post
|
|
[ $1 -eq 0 ] && {
|
|
# install the httpd configuration file for the first installation
|
|
install -D -m 0644 %{_sysconfdir}/codepot/codepot.httpd %{_sysconfdir}/httpd/conf.d/codepot.conf
|
|
}
|
|
exit 0
|
|
|
|
%preun
|
|
exit 0
|
|
|
|
%postun
|
|
[ $1 -eq 0 ] && {
|
|
rm -f %{_sysconfdir}/httpd/conf.d/codepot.conf
|
|
}
|
|
exit 0
|