- updated to 0.8.3.1; BR: git-core-devel >= 1.7.1-2 (compat/bswap.h)
[packages/cgit.git] / cgit.spec
CommitLineData
bf1ce868
AG
1#
2# Conditional build
3%bcond_with verbose # verbose build (V=1)
4#
5Summary: cgit - a fast webinterface to git
da36549f 6Summary(pl.UTF-8): cgit - szybki interfejs WWW do gita
bf1ce868 7Name: cgit
adb3e92f
AG
8Version: 0.8.3.1
9Release: 1
bf1ce868
AG
10License: GPL v2
11Group: Development/Tools
12Source0: http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2
adb3e92f 13# Source0-md5: cc61989f702ce77e56137be67e01f3ed
bf1ce868
AG
14Source1: %{name}.conf
15Source2: %{name}-repo.conf
16Source3: %{name}-httpd.conf
ca7782e7
AG
17Patch0: %{name}-system-git.patch
18Patch1: %{name}-override-cflags.patch
bf1ce868 19URL: http://hjemli.net/git/cgit
adb3e92f 20BuildRequires: git-core-devel >= 1.7.1-2
bf1ce868
AG
21BuildRequires: openssl-devel
22Requires: webapps
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%define webapp cgit
26%define webappdir %{_sysconfdir}/webapps/%{webapp}
27%define appdir %{_datadir}/%{webapp}
28%define cgibindir %{_prefix}/lib/cgi-bin
29
30%description
31Cgit is a CGI application implemented in C: it's basically (yet)
da36549f 32another git command, used to generate HTML. Cgit is not forking: all
bf1ce868 33git operations are performed by linking with libgit.a. It uses a
da36549f 34built-in cache: the generated HTML is stored on disk for the benefit
bf1ce868
AG
35of later requests.
36
37%description -l pl.UTF-8
da36549f
JB
38Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
39interfejs do gita, generujący kod HTML. Cgit jest aplikacją
bf1ce868
AG
40nieforkującą - wszystkie operacje na repozytoriach wykonywane są z
41użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod
da36549f 42HTML zapisany jest na dysku dla kolejnych żądań.
bf1ce868
AG
43
44%prep
45%setup -q
46%patch0 -p1
47%patch1 -p1
48
49%build
50%{__make} \
51 CC="%{__cc}" \
52 CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
53 LDFLAGS="%{rpmldflags}" \
6815c324 54 LIBDIR=%{_libdir} \
bf1ce868
AG
55 CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
56 CGIT_SCRIPT_PATH="%{cgibindir}" \
57 %{?with_verbose:V=1}
58
59%install
60rm -rf $RPM_BUILD_ROOT
61
62%{__make} install \
63 DESTDIR=$RPM_BUILD_ROOT \
64 CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \
65 CGIT_SCRIPT_PATH="%{cgibindir}" \
66 %{?with_verbose:V=1}
67
68# css and logo
69install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
70mv $RPM_BUILD_ROOT%{cgibindir}/%{name}.{css,png} $RPM_BUILD_ROOT%{appdir}
71
72# cache
73install -d $RPM_BUILD_ROOT/var/cache/cgit
74
75# webapp stuff
76install -d $RPM_BUILD_ROOT%{webappdir}
77install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}
78install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}
79install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf
80install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
81
82%clean
83rm -rf $RPM_BUILD_ROOT
84
85%triggerin -- apache1 < 1.3.37-3, apache1-base
86%webapp_register apache %{webapp}
87
88%triggerun -- apache1 < 1.3.37-3, apache1-base
89%webapp_unregister apache %{webapp}
90
91%triggerin -- apache < 2.2.0, apache-base
92%webapp_register httpd %{webapp}
93
94%triggerun -- apache < 2.2.0, apache-base
95%webapp_unregister httpd %{webapp}
96
97%files
98%defattr(644,root,root,755)
99%doc README cgitrc.5.txt
100%dir %{webappdir}
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
107%{appdir}
This page took 0.089099 seconds and 4 git commands to generate.