diff --git a/README.md b/README.md index fed1b84..2644996 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # gitolite +Highly flexible server for git directory version tracker. + diff --git a/gitolite.spec b/gitolite.spec new file mode 100644 index 0000000..a262c37 --- /dev/null +++ b/gitolite.spec @@ -0,0 +1,73 @@ +%define git_uid 65062 +%define git_gid 65062 + +Name: gitolite +Version: 3.6.11 +Release: 1mamba +Summary: Highly flexible server for git directory version tracker +Group: Applications/Development +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/sitaramc/gitolite/wiki +## GITSOURCE https://github.com/sitaramc/gitolite.git v3.6.11 +Source: https://github.com/sitaramc/gitolite.git/v%{version}/gitolite-%{version}.tar.bz2 +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: libperl +BuildRequires: perl-Redis +BuildRequires: perl-devel +## AUTOBUILDREQ-END +Requires: git +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Highly flexible server for git directory version tracker. + +%prep +%setup -q + +%build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +# Directory structure +install -d %{buildroot}/%{_localstatedir}/lib/%{name} +install -d %{buildroot}/%{_localstatedir}/lib/%{name}/.ssh +install -d %{buildroot}%{_bindir} +install -d %{buildroot}%{perl_vendorlib} +install -d %{buildroot}/%{_datadir}/%{name} + +# Code +cp -pr src/lib/Gitolite %{buildroot}%{perl_vendorlib} +echo "%{version}-%{release}" >src/VERSION +cp -a src/* %{buildroot}%{_datadir}/%{name} +ln -s %{_datadir}/%{name}/gitolite %{buildroot}%{_bindir}/gitolite + +# empty authorized_keys file +touch %{buildroot}/var/lib/%{name}/.ssh/authorized_keys + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%pre +/usr/sbin/groupadd -g %{git_gid} git 2>/dev/null +/usr/sbin/useradd -u %{git_uid} -r -d %{_localstatedir}/lib/%{name} -g git \ + -s /bin/sh -c "git repository hosting" git 2>/dev/null +: + +%files +%defattr(-,root,root) +%{_bindir}/gitolite +%dir %{_datadir}/gitolite +%{_datadir}/gitolite/* +%dir %{perl_vendorlib}/Gitolite +%{perl_vendorlib}/Gitolite/* +%attr(750,git,git) %dir %{_localstatedir}/lib/gitolite +%attr(750,git,git) %dir %{_localstatedir}/lib/gitolite/.ssh +%config(noreplace) %attr(640,git,git) %{_localstatedir}/lib/gitolite/.ssh/authorized_keys +%doc COPYING + +%changelog +* Tue Feb 25 2020 Silvan Calarco 3.6.11-1mamba +- package created using the webbuild interface