3 %bcond_with verbose # verbose build (V=1)
5 Summary: cgit - a fast webinterface to git
6 Summary(pl.UTF-8): cgit - szybki interfejs WWW do gita
11 Group: Development/Tools
12 Source0: http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2
13 # Source0-md5: 4939e586b850b08c9ee59469e43e7418
15 Source2: %{name}-repo.conf
16 Source3: %{name}-httpd.conf
17 Patch0: %{name}-system-git.patch
18 Patch1: %{name}-override-cflags.patch
19 URL: http://hjemli.net/git/cgit
20 BuildRequires: git-core-devel >= 1.7.1-2
21 BuildRequires: openssl-devel
22 BuildConflicts: zlib-devel = 1.2.5-1
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define webappdir %{_sysconfdir}/webapps/%{webapp}
28 %define appdir %{_datadir}/%{webapp}
29 %define cgibindir %{_prefix}/lib/cgi-bin
32 Cgit is a CGI application implemented in C: it's basically (yet)
33 another git command, used to generate HTML. Cgit is not forking: all
34 git operations are performed by linking with libgit.a. It uses a
35 built-in cache: the generated HTML is stored on disk for the benefit
38 %description -l pl.UTF-8
39 Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
40 interfejs do gita, generujący kod HTML. Cgit jest aplikacją
41 nieforkującą - wszystkie operacje na repozytoriach wykonywane są z
42 użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod
43 HTML zapisany jest na dysku dla kolejnych żądań.
53 CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
54 LDFLAGS="%{rpmldflags}" \
56 CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
57 CGIT_SCRIPT_PATH="%{cgibindir}" \
61 rm -rf $RPM_BUILD_ROOT
64 DESTDIR=$RPM_BUILD_ROOT \
65 CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \
66 CGIT_SCRIPT_PATH="%{cgibindir}" \
70 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
71 mv $RPM_BUILD_ROOT%{cgibindir}/%{name}.{css,png} $RPM_BUILD_ROOT%{appdir}
74 install -d $RPM_BUILD_ROOT/var/cache/cgit
77 install -d $RPM_BUILD_ROOT%{webappdir}
78 install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}
79 install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}
80 install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf
81 install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
84 rm -rf $RPM_BUILD_ROOT
86 %triggerin -- apache1 < 1.3.37-3, apache1-base
87 %webapp_register apache %{webapp}
89 %triggerun -- apache1 < 1.3.37-3, apache1-base
90 %webapp_unregister apache %{webapp}
92 %triggerin -- apache < 2.2.0, apache-base
93 %webapp_register httpd %{webapp}
95 %triggerun -- apache < 2.2.0, apache-base
96 %webapp_unregister httpd %{webapp}
99 %defattr(644,root,root,755)
100 %doc README cgitrc.5.txt
102 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit.conf
103 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit-repo.conf
104 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
105 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
106 %attr(755,root,root) %{cgibindir}/cgit.cgi
107 %attr(770,root,http) /var/cache/cgit