2010-04-07 12:13:44 +00:00
|
|
|
%define _prefix /usr
|
|
|
|
%define _sysconfdir /etc
|
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
%if %{?php_package_name:0}%{!?php_package_name:1}
|
|
|
|
# if php_package_name is not defined
|
|
|
|
%define php_package_name php
|
|
|
|
%endif
|
|
|
|
|
2010-04-07 12:13:44 +00:00
|
|
|
Summary: Codepot code repository manager
|
|
|
|
Name: @PACKAGE_NAME@
|
|
|
|
Version: @PACKAGE_VERSION@
|
2015-04-10 14:48:38 +00:00
|
|
|
Release: %{php_package_name}.1%{?dist}
|
2010-04-07 12:13:44 +00:00
|
|
|
License: GPL
|
2010-04-07 14:38:07 +00:00
|
|
|
Group: Applications/Utilities
|
2015-04-10 14:48:38 +00:00
|
|
|
#BuildArch: noarch
|
2010-04-07 12:13:44 +00:00
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
|
2015-08-13 02:20:26 +00:00
|
|
|
Requires: httpd %{php_package_name} %{php_package_name}-ldap %{php_package_name}-mysql %{php_package_name}-gd subversion subversion-perl mod_dav_svn mod_perl perl perl-LDAP perl-Config-Simple perl-URI perl-DBI perl-Digest-SHA1 perl-Mail-Sendmail
|
2015-04-10 14:48:38 +00:00
|
|
|
# %{php_package_name}-pecl-svn > 1.2.0
|
2015-04-28 05:12:06 +00:00
|
|
|
# %{php_package_name}-pgsql perl-DBD-Pg
|
2010-04-07 12:13:44 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
BuildRequires: subversion-devel neon-devel %{php_package_name}-devel
|
2010-04-07 12:13:44 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
2010-04-07 14:38:07 +00:00
|
|
|
%description
|
2010-04-07 12:13:44 +00:00
|
|
|
Codepot code repository manager
|
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
%package peclsvn
|
|
|
|
Summary: PHP Subversion extension
|
|
|
|
Group: Development/Languages
|
|
|
|
#BuildArch: %{_target_platform}
|
2015-04-11 14:28:29 +00:00
|
|
|
# %{PACKAGE_VERSION} is deprecated. %{Version} is supported in some
|
|
|
|
# recent distros. Never mind. Let's just resort to the autoconf replacement.
|
|
|
|
Requires: @PACKAGE_NAME@ = @PACKAGE_VERSION@
|
2015-04-10 14:48:38 +00:00
|
|
|
Conflicts: %{php_package_name}-pecl-svn
|
|
|
|
|
|
|
|
%description peclsvn
|
|
|
|
This package contains svn.so for PHP. You can install this package
|
2015-04-14 09:47:27 +00:00
|
|
|
if your system doesn't have a proper Subversion extenstion required by Codepot.
|
|
|
|
It is also safe to install this RPM package without Codepot by ignoring the
|
|
|
|
dependency.
|
2015-04-10 14:48:38 +00:00
|
|
|
|
2010-04-07 12:13:44 +00:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2015-04-10 14:48:38 +00:00
|
|
|
--libdir=%{_libdir} \
|
2010-04-07 12:13:44 +00:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--with-wwwdir=/var/www/html/codepot \
|
|
|
|
--with-cfgdir=/etc/codepot \
|
|
|
|
--with-depotdir=/var/lib/codepot \
|
|
|
|
--with-logdir=/var/log/codepot \
|
2015-04-10 14:48:38 +00:00
|
|
|
--with-cachedir=/var/cache/codepot \
|
|
|
|
--with-phpextdir=%{_libdir}/php/modules \
|
|
|
|
--with-phpextinidir=%{_sysconfdir}/php.d
|
2010-04-07 12:13:44 +00:00
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
2022-02-18 14:51:14 +00:00
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
rm -f %{buildroot}/var/lib/codepot/codepot.db
|
2010-04-07 12:13:44 +00:00
|
|
|
|
|
|
|
%clean
|
2022-02-18 14:51:14 +00:00
|
|
|
rm -rf %{buildroot}
|
2010-04-07 12:13:44 +00:00
|
|
|
|
|
|
|
%files
|
2010-04-07 14:38:07 +00:00
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
/var/www/html/codepot
|
2014-05-17 16:22:56 +00:00
|
|
|
/usr/sbin/codepot-user
|
2016-01-20 04:06:51 +00:00
|
|
|
/usr/sbin/codepot-mon-httpd
|
2010-04-07 14:38:07 +00:00
|
|
|
|
|
|
|
%config(noreplace) /etc/codepot/codepot.ini
|
2011-07-21 14:23:25 +00:00
|
|
|
/etc/codepot/codepot.mysql
|
2015-04-28 05:12:06 +00:00
|
|
|
/etc/codepot/codepot.pgsql
|
2022-02-18 14:51:14 +00:00
|
|
|
/etc/codepot/codepot.sqlite
|
2010-04-07 14:38:07 +00:00
|
|
|
/etc/codepot/codepot.a2ldap
|
2014-05-20 02:17:35 +00:00
|
|
|
/etc/codepot/codepot.httpd
|
2010-04-07 14:38:07 +00:00
|
|
|
/etc/codepot/start-commit
|
|
|
|
/etc/codepot/pre-commit
|
|
|
|
/etc/codepot/post-commit
|
2010-04-18 13:13:05 +00:00
|
|
|
/etc/codepot/pre-revprop-change
|
|
|
|
/etc/codepot/post-revprop-change
|
2015-02-05 13:12:37 +00:00
|
|
|
/etc/codepot/cloc.pl
|
2014-05-15 16:17:21 +00:00
|
|
|
/etc/codepot/perl/Codepot/AccessHandler.pm
|
|
|
|
/etc/codepot/perl/Codepot/AuthenHandler.pm
|
2010-04-07 14:38:07 +00:00
|
|
|
|
2015-04-24 14:59:27 +00:00
|
|
|
%dir %attr(-,apache,apache) /var/lib/codepot/svnrepo
|
|
|
|
%dir %attr(-,apache,apache) /var/lib/codepot/files
|
2015-12-29 10:19:03 +00:00
|
|
|
%dir %attr(-,apache,apache) /var/lib/codepot/issuefiles
|
2015-04-24 14:59:27 +00:00
|
|
|
%dir %attr(-,apache,apache) /var/lib/codepot/attachments
|
|
|
|
%dir %attr(-,apache,apache) /var/lib/codepot/usericons
|
|
|
|
%dir %attr(-,apache,apache) /var/log/codepot
|
|
|
|
%dir %attr(-,apache,apache) /var/cache/codepot
|
2010-04-07 12:13:44 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
%files peclsvn
|
|
|
|
%{_libdir}/php/modules/svn.so
|
|
|
|
%config(noreplace) %{_sysconfdir}/php.d/svn.ini
|
|
|
|
|
2010-04-07 12:13:44 +00:00
|
|
|
%pre
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%post
|
2015-04-10 14:48:38 +00:00
|
|
|
[ $1 -eq 1 ] && {
|
|
|
|
# Fresh installation.
|
|
|
|
|
2014-05-20 02:17:35 +00:00
|
|
|
# install the httpd configuration file for the first installation
|
|
|
|
install -D -m 0644 %{_sysconfdir}/codepot/codepot.httpd %{_sysconfdir}/httpd/conf.d/codepot.conf
|
2015-04-10 14:48:38 +00:00
|
|
|
|
|
|
|
# change the selinux context on data directories
|
|
|
|
chcon -Rv --type=httpd_sys_content_t /var/lib/codepot >/dev/null 2>&1
|
|
|
|
chcon -Rv --type=httpd_sys_content_t /var/cache/codepot >/dev/null 2>&1
|
2014-05-20 02:17:35 +00:00
|
|
|
}
|
2010-04-07 12:13:44 +00:00
|
|
|
exit 0
|
|
|
|
|
|
|
|
%preun
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%postun
|
2014-05-20 02:17:35 +00:00
|
|
|
[ $1 -eq 0 ] && {
|
2015-04-10 14:48:38 +00:00
|
|
|
# Uninstallation
|
2014-05-20 02:17:35 +00:00
|
|
|
rm -f %{_sysconfdir}/httpd/conf.d/codepot.conf
|
|
|
|
}
|
2010-04-07 12:13:44 +00:00
|
|
|
exit 0
|