]> git.pld-linux.org Git - packages/cgit.git/blob - cgit.spec
- 0.8.3.2
[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.2
9 Release:        1
10 License:        GPL v2
11 Group:          Development/Tools
12 Source0:        http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2
13 # Source0-md5:  4939e586b850b08c9ee59469e43e7418
14 Source1:        %{name}.conf
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
23 Requires:       webapps
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         webapp          cgit
27 %define         webappdir       %{_sysconfdir}/webapps/%{webapp}
28 %define         appdir          %{_datadir}/%{webapp}
29 %define         cgibindir       %{_prefix}/lib/cgi-bin
30
31 %description
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
36 of later requests.
37
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ń.
44
45 %prep
46 %setup -q
47 %patch0 -p1
48 %patch1 -p1
49
50 %build
51 %{__make} \
52         CC="%{__cc}" \
53         CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
54         LDFLAGS="%{rpmldflags}" \
55         LIBDIR=%{_libdir} \
56         CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
57         CGIT_SCRIPT_PATH="%{cgibindir}" \
58         %{?with_verbose:V=1}
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62
63 %{__make} install \
64         DESTDIR=$RPM_BUILD_ROOT \
65         CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \
66         CGIT_SCRIPT_PATH="%{cgibindir}" \
67         %{?with_verbose:V=1}
68
69 # css and logo
70 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
71 mv $RPM_BUILD_ROOT%{cgibindir}/%{name}.{css,png} $RPM_BUILD_ROOT%{appdir}
72
73 # cache
74 install -d $RPM_BUILD_ROOT/var/cache/cgit
75
76 # webapp stuff
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
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %triggerin -- apache1 < 1.3.37-3, apache1-base
87 %webapp_register apache %{webapp}
88
89 %triggerun -- apache1 < 1.3.37-3, apache1-base
90 %webapp_unregister apache %{webapp}
91
92 %triggerin -- apache < 2.2.0, apache-base
93 %webapp_register httpd %{webapp}
94
95 %triggerun -- apache < 2.2.0, apache-base
96 %webapp_unregister httpd %{webapp}
97
98 %files
99 %defattr(644,root,root,755)
100 %doc README cgitrc.5.txt
101 %dir %{webappdir}
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
108 %{appdir}
This page took 0.054369 seconds and 3 git commands to generate.