]> git.pld-linux.org Git - packages/cgit.git/blob - cgit.spec
0075933ba3a281e2d349c0fa3ce816e4b1b387f1
[packages/cgit.git] / cgit.spec
1 #
2 # Conditional build
3 %bcond_with     verbose         # verbose build (V=1)
4 #
5 Summary:        cgit - a fast webinterface to git
6 Summary(pl.UTF-8):      cgit - szybki interfejs WWW do gita
7 Name:           cgit
8 Version:        0.8.3.4
9 Release:        2
10 License:        GPL v2
11 Group:          Development/Tools
12 Source0:        http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2
13 # Source0-md5:  712e4d3013d754aa5752e0101188cf32
14 Source1:        %{name}.conf
15 Source2:        %{name}-repo.conf
16 Source3:        %{name}-apache.conf
17 Source4:        %{name}-httpd.conf
18 Patch0:         %{name}-system-git.patch
19 Patch1:         %{name}-override-cflags.patch
20 URL:            http://hjemli.net/git/cgit
21 BuildRequires:  git-core-devel >= 1.7.3
22 BuildRequires:  openssl-devel
23 BuildConflicts: zlib-devel = 1.2.5-1
24 Requires:       webapps
25 Conflicts:      apache-base < 2.4.0-1
26 BuildRoot:      %{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
34 Cgit is a CGI application implemented in C: it's basically (yet)
35 another git command, used to generate HTML. Cgit is not forking: all
36 git operations are performed by linking with libgit.a. It uses a
37 built-in cache: the generated HTML is stored on disk for the benefit
38 of later requests.
39
40 %description -l pl.UTF-8
41 Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
42 interfejs do gita, generujący kod HTML. Cgit jest aplikacją
43 nieforkującą - wszystkie operacje na repozytoriach wykonywane są z
44 użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod
45 HTML zapisany jest na dysku dla kolejnych żądań.
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}" \
57         LIBDIR=%{_libdir} \
58         CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
59         CGIT_SCRIPT_PATH="%{cgibindir}" \
60         %{?with_verbose:V=1}
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64
65 %{__make} install \
66         DESTDIR=$RPM_BUILD_ROOT \
67         CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \
68         CGIT_DATA_PATH="%{appdir}" \
69         CGIT_SCRIPT_PATH="%{cgibindir}" \
70         %{?with_verbose:V=1}
71
72 # cache
73 install -d $RPM_BUILD_ROOT/var/cache/cgit
74
75 # webapp stuff
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 %{SOURCE4} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
81
82 %clean
83 rm -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-base
92 %webapp_register httpd %{webapp}
93
94 %triggerun -- 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.041124 seconds and 2 git commands to generate.