]> git.pld-linux.org Git - packages/cgit.git/blame - cgit.spec
- migrate to apache 2.4
[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
18ab1fdd 8Version: 0.8.3.4
6e601396 9Release: 2
bf1ce868
AG
10License: GPL v2
11Group: Development/Tools
12Source0: http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2
18ab1fdd 13# Source0-md5: 712e4d3013d754aa5752e0101188cf32
bf1ce868
AG
14Source1: %{name}.conf
15Source2: %{name}-repo.conf
6e601396
JR
16Source3: %{name}-apache.conf
17Source4: %{name}-httpd.conf
ca7782e7
AG
18Patch0: %{name}-system-git.patch
19Patch1: %{name}-override-cflags.patch
bf1ce868 20URL: http://hjemli.net/git/cgit
18ab1fdd 21BuildRequires: git-core-devel >= 1.7.3
bf1ce868 22BuildRequires: openssl-devel
77429544 23BuildConflicts: zlib-devel = 1.2.5-1
bf1ce868 24Requires: webapps
6e601396 25Conflicts: apache-base < 2.4.0-1
bf1ce868
AG
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%define webapp cgit
29%define webappdir %{_sysconfdir}/webapps/%{webapp}
30%define appdir %{_datadir}/%{webapp}
31%define cgibindir %{_prefix}/lib/cgi-bin
32
33%description
34Cgit is a CGI application implemented in C: it's basically (yet)
da36549f 35another git command, used to generate HTML. Cgit is not forking: all
bf1ce868 36git operations are performed by linking with libgit.a. It uses a
da36549f 37built-in cache: the generated HTML is stored on disk for the benefit
bf1ce868
AG
38of later requests.
39
40%description -l pl.UTF-8
da36549f
JB
41Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
42interfejs do gita, generujący kod HTML. Cgit jest aplikacją
bf1ce868
AG
43nieforkującą - wszystkie operacje na repozytoriach wykonywane są z
44użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod
da36549f 45HTML zapisany jest na dysku dla kolejnych żądań.
bf1ce868
AG
46
47%prep
48%setup -q
49%patch0 -p1
50%patch1 -p1
51
52%build
53%{__make} \
54 CC="%{__cc}" \
55 CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
56 LDFLAGS="%{rpmldflags}" \
6815c324 57 LIBDIR=%{_libdir} \
bf1ce868
AG
58 CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
59 CGIT_SCRIPT_PATH="%{cgibindir}" \
60 %{?with_verbose:V=1}
61
62%install
63rm -rf $RPM_BUILD_ROOT
64
65%{__make} install \
66 DESTDIR=$RPM_BUILD_ROOT \
67 CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \
1807596b 68 CGIT_DATA_PATH="%{appdir}" \
bf1ce868
AG
69 CGIT_SCRIPT_PATH="%{cgibindir}" \
70 %{?with_verbose:V=1}
71
bf1ce868
AG
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
6e601396 80install %{SOURCE4} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
bf1ce868
AG
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
6e601396 91%triggerin -- apache-base
bf1ce868
AG
92%webapp_register httpd %{webapp}
93
6e601396 94%triggerun -- apache-base
bf1ce868
AG
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.084783 seconds and 4 git commands to generate.