xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
<root> / rocketgit.spec.in (a47d6af13cfa2b18f1e8247b8e20037f31aa5b05) (2,248B) (mode 100644) [raw]
Summary:	Light and fast Git hosting solution
Name:		@PRJ@
Version:	@VER@
Release:	@REV@
License:	GPLv3
Group:		Development/Tools
Source:		http://kernel.embedromix.ro/us/rocketgit/%{name}-%{version}.tar.gz
URL:		http://kernel.embedromix.ro/us/
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot
BuildArch:	noarch
Requires:	httpd, php, php-cli, php-pgsql, php-gd, xinetd
Requires:	shadow-utils, git, postgresql-server, policycoreutils-python


%description
Light and fast Git hosting solution, similar with Gitorious/GitHub/etc.

%pre
getent group rocketgit >/dev/null || groupadd -r rocketgit
getent passwd rocketgit >/dev/null || useradd -r -g rocketgit -s /bin/bash -m -d /home/rocketgit -c "RocketGit user" rocketgit
semanage fcontext -a -t httpd_log_t "/var/log/rocketgit-web(/.*)?" || :
semanage fcontext -a -t public_content_rw_t "/var/lib/rocketgit(/.*)?" || :

%post
if [ $1 -ne 0 ]; then
	/sbin/service xinetd reload &>/dev/null || :
	/sbin/service httpd reload &>/dev/null || :
fi

%postun
if [ $1 = 0 ]; then
	userdel rocketgit
	semanage fcontext -d "/var/lib/rocketgit(/.*)?" || :
	semanage fcontext -d "/var/log/rocketgit-web(/.*)?" || :
fi

%prep
%setup -q

%build
%configure
make

%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}
make install DESTDIR=${RPM_BUILD_ROOT}

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%attr (-,root,root)
@USR_SHARE@/@PRJ@
%doc README LICENSE Changelog TODO
%dir /etc/@PRJ@
%config(noreplace) /etc/@PRJ@/config.php
/etc/@PRJ@/config.php.sample
/etc/cron.d/rocketgit
%config(noreplace) /etc/xinetd.d/rocketgit
%config(noreplace) /etc/httpd/conf.d/rocketgit.conf
%attr(0700,rocketgit,rocketgit) %dir /var/log/@PRJ@
%attr(0700,apache,apache) %dir /var/log/@PRJ@-web
%attr(0755,rocketgit,rocketgit) %dir /var/lib/@PRJ@
%attr(0700,rocketgit,rocketgit) %dir /var/lib/@PRJ@/locks
%attr(0755,rocketgit,rocketgit) %dir /var/lib/@PRJ@/repos
%attr(0700,rocketgit,rocketgit) %dir /var/lib/@PRJ@/q_merge_requests
%config(noreplace) /etc/logrotate.d/rocketgit

%changelog
* Wed Oct 17 2012 Catalin(ux) M. BOIE <catab at embedromix dor ro> 0.10
Alpha1 version released with a lot of fixes and some features.

* Mon Jun 27 2011 Catalin(ux) M. BOIE <catab at embedromix dot ro> 0.2
Another round of bulk changes.
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master