summaryrefslogtreecommitdiffstats
path: root/cgit.spec
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@fedoraproject.org>2009-01-13 21:48:56 +0000
committerTodd Zullinger <tmz@fedoraproject.org>2009-01-13 21:48:56 +0000
commit9c9db9d979a91cd5fe414afb9789ee6b83d35beb (patch)
tree5f9d1dde40542a3ae451aeedc9f265486d45ca6d /cgit.spec
parent8040608946ac0e238807e233d24fc0489c628492 (diff)
downloadcgit_EL6-9c9db9d979a91cd5fe414afb9789ee6b83d35beb.tar.gz
Import cgit on devel branchcgit-0_8_1-1_fc11
Diffstat (limited to 'cgit.spec')
-rw-r--r--cgit.spec88
1 files changed, 88 insertions, 0 deletions
diff --git a/cgit.spec b/cgit.spec
new file mode 100644
index 0000000..67f71e9
--- /dev/null
+++ b/cgit.spec
@@ -0,0 +1,88 @@
+# Review bug: https://bugzilla.redhat.com/479723
+
+%define gitver 1.6.0.2
+%define cachedir %{_localstatedir}/cache/cgit
+%define scriptdir %{_localstatedir}/www/cgi-bin
+%define cgitdata %{_datadir}/cgit
+
+%define make_cgit \
+export CFLAGS="%{optflags}" \
+make V=1 %{?_smp_mflags} \\\
+ DESTDIR=%{buildroot} \\\
+ INSTALL="install -p" \\\
+ CACHE_ROOT=%{cachedir} \\\
+ CGIT_SCRIPT_PATH=%{scriptdir} \\\
+ CGIT_SCRIPT_NAME=cgit \\\
+ CGIT_DATA_PATH=%{cgitdata}
+
+Name: cgit
+Version: 0.8.1
+Release: 1%{?dist}
+Summary: A fast webinterface for git
+
+Group: Development/Tools
+License: GPLv2
+URL: http://hjemli.net/git/cgit/
+Source0: http://hjemli.net/git/cgit/snapshot/cgit-0.8.1.tar.bz2
+Source1: http://www.kernel.org/pub/software/scm/git/git-%{gitver}.tar.bz2
+Source2: cgitrc
+Source3: cgit.httpd
+Source4: README.SELinux
+# Applied upstream stable branch (4ac89ec and d529c6f)
+Patch0: cgit-0.8.1-Makefile-install.patch
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+%if 0%{?fedora}
+BuildRequires: libcurl-devel
+%else
+BuildRequires: curl-devel
+%endif
+BuildRequires: openssl-devel
+Requires: httpd
+
+%description
+This is an attempt to create a fast web interface for the git scm,
+using a builtin cache to decrease server io-pressure.
+
+%prep
+%setup -q -a 1
+%patch0 -p1 -b .install
+
+# setup the git dir
+rm -rf git
+mv git-%{gitver} git
+sed -i 's/^\(CFLAGS = \).*/\1%{optflags}/' git/Makefile
+
+# add README.SELinux
+cp -p %{SOURCE4} .
+
+
+%build
+%{make_cgit}
+
+
+%install
+rm -rf %{buildroot}
+%{make_cgit} install
+install -d -m0755 %{buildroot}%{_sysconfdir}/httpd/conf.d
+install -p -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/cgitrc
+install -p -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/cgit.conf
+install -d -m0755 %{buildroot}%{cachedir}
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING README* cgitrc.5.txt
+%config(noreplace) %{_sysconfdir}/cgitrc
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/cgit.conf
+%dir %attr(-,apache,root) %{cachedir}
+%{cgitdata}
+%{scriptdir}/*
+
+
+%changelog
+* Mon Jan 12 2009 Todd Zullinger <tmz@pobox.com> - 0.8.1-1
+- Initial package