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: 872fafaa1ea6bd9292f312878864b665
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.6.1.1
21 BuildRequires: openssl-devel
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define webappdir %{_sysconfdir}/webapps/%{webapp}
27 %define appdir %{_datadir}/%{webapp}
28 %define cgibindir %{_prefix}/lib/cgi-bin
31 Cgit is a CGI application implemented in C: it's basically (yet)
32 another git command, used to generate HTML. Cgit is not forking: all
33 git operations are performed by linking with libgit.a. It uses a
34 built-in cache: the generated HTML is stored on disk for the benefit
37 %description -l pl.UTF-8
38 Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
39 interfejs do gita, generujący kod HTML. Cgit jest aplikacją
40 nieforkującą - wszystkie operacje na repozytoriach wykonywane są z
41 użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod
42 HTML zapisany jest na dysku dla kolejnych żądań.
52 CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
53 LDFLAGS="%{rpmldflags}" \
55 CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
56 CGIT_SCRIPT_PATH="%{cgibindir}" \
60 rm -rf $RPM_BUILD_ROOT
63 DESTDIR=$RPM_BUILD_ROOT \
64 CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \
65 CGIT_SCRIPT_PATH="%{cgibindir}" \
69 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
70 mv $RPM_BUILD_ROOT%{cgibindir}/%{name}.{css,png} $RPM_BUILD_ROOT%{appdir}
73 install -d $RPM_BUILD_ROOT/var/cache/cgit
76 install -d $RPM_BUILD_ROOT%{webappdir}
77 install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}
78 install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}
79 install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf
80 install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
83 rm -rf $RPM_BUILD_ROOT
85 %triggerin -- apache1 < 1.3.37-3, apache1-base
86 %webapp_register apache %{webapp}
88 %triggerun -- apache1 < 1.3.37-3, apache1-base
89 %webapp_unregister apache %{webapp}
91 %triggerin -- apache < 2.2.0, apache-base
92 %webapp_register httpd %{webapp}
94 %triggerun -- apache < 2.2.0, apache-base
95 %webapp_unregister httpd %{webapp}
98 %defattr(644,root,root,755)
99 %doc README cgitrc.5.txt
101 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit.conf
102 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit-repo.conf
103 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
104 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
105 %attr(755,root,root) %{cgibindir}/cgit.cgi
106 %attr(770,root,http) /var/cache/cgit