SPECS: cgit.spec (NEW) - new

adamg adamg at pld-linux.org
Thu Dec 11 09:17:31 CET 2008


Author: adamg                        Date: Thu Dec 11 08:17:31 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- new

---- Files affected:
SPECS:
   cgit.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/cgit.spec
diff -u /dev/null SPECS/cgit.spec:1.1
--- /dev/null	Thu Dec 11 09:17:31 2008
+++ SPECS/cgit.spec	Thu Dec 11 09:17:25 2008
@@ -0,0 +1,117 @@
+# $Revision$, $Date$
+#
+# Conditional build
+%bcond_with	verbose		# verbose build (V=1)
+#
+Summary:	cgit - a fast webinterface to git
+Summary(pl.UTF-8):	cgit - szybki interfejs webowy do git-a
+Name:		cgit
+Version:	0.8.1
+Release:	0.0.1
+License:	GPL v2
+Group:		Development/Tools
+Source0:	http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2
+# Source0-md5:	654850ded01dd2f6b732aa7c1b0856dc
+Patch0:		%{name}-system-git.patch
+Patch1:		%{name}-override-cflags.patch
+Source1:	%{name}.conf
+Source2:	%{name}-repo.conf
+Source3:	%{name}-httpd.conf
+URL:		http://hjemli.net/git/cgit
+BuildRequires:	git-core-devel >= 1.6.0.5-2
+BuildRequires:	openssl-devel
+Requires:	webapps
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		webapp		cgit
+%define		webappdir	%{_sysconfdir}/webapps/%{webapp}
+%define		appdir		%{_datadir}/%{webapp}
+%define		cgibindir	%{_prefix}/lib/cgi-bin
+
+%description
+Cgit is a CGI application implemented in C: it's basically (yet)
+another git command, used to generate html. Cgit is not forking: all
+git operations are performed by linking with libgit.a. It uses a
+built-in cache: the generated html is stored on disk for the benefit
+of later requests.
+
+%description -l pl.UTF-8
+Cgit to: napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
+interfejs do git-a, generujący kod html. Cgit jest aplikacją
+nieforkującą - wszystkie operacje na repozytoriach wykonywane są z
+użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod
+htl zapisany jest na dysku dla kolejnych żądań.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__make} \
+	CC="%{__cc}" \
+	CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
+	LDFLAGS="%{rpmldflags}" \
+	CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
+	CGIT_SCRIPT_PATH="%{cgibindir}" \
+	%{?with_verbose:V=1}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \
+	CGIT_SCRIPT_PATH="%{cgibindir}" \
+	%{?with_verbose:V=1}
+
+# css and logo
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
+mv $RPM_BUILD_ROOT%{cgibindir}/%{name}.{css,png} $RPM_BUILD_ROOT%{appdir}
+
+# cache
+install -d $RPM_BUILD_ROOT/var/cache/cgit
+
+# webapp stuff
+install -d $RPM_BUILD_ROOT%{webappdir}
+install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}
+install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}
+install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf
+install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{webapp}
+
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{webapp}
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{webapp}
+
+%files
+%defattr(644,root,root,755)
+%doc README cgitrc.5.txt
+%dir %{webappdir}
+%config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit.conf
+%config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit-repo.conf
+%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
+%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
+%attr(755,root,root) %{cgibindir}/cgit.cgi
+%attr(770,root,http) /var/cache/cgit
+%{appdir}
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2008/12/11 08:17:25  adamg
+- new
+
================================================================


More information about the pld-cvs-commit mailing list