]> git.pld-linux.org Git - packages/cgit.git/blob - cgit.spec
- cosmetics
[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 webowy do git-a
7 Name:           cgit
8 Version:        0.8.1
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:  654850ded01dd2f6b732aa7c1b0856dc
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.6.0.5-2
21 BuildRequires:  openssl-devel
22 Requires:       webapps
23 BuildRoot:      %{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
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
35 of later requests.
36
37 %description -l pl.UTF-8
38 Cgit to: napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
39 interfejs do git-a, 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 htl zapisany jest na dysku dla kolejnych żądań.
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}" \
54         CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
55         CGIT_SCRIPT_PATH="%{cgibindir}" \
56         %{?with_verbose:V=1}
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60
61 %{__make} install \
62         DESTDIR=$RPM_BUILD_ROOT \
63         CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \
64         CGIT_SCRIPT_PATH="%{cgibindir}" \
65         %{?with_verbose:V=1}
66
67 # css and logo
68 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
69 mv $RPM_BUILD_ROOT%{cgibindir}/%{name}.{css,png} $RPM_BUILD_ROOT%{appdir}
70
71 # cache
72 install -d $RPM_BUILD_ROOT/var/cache/cgit
73
74 # webapp stuff
75 install -d $RPM_BUILD_ROOT%{webappdir}
76 install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}
77 install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}
78 install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf
79 install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %triggerin -- apache1 < 1.3.37-3, apache1-base
85 %webapp_register apache %{webapp}
86
87 %triggerun -- apache1 < 1.3.37-3, apache1-base
88 %webapp_unregister apache %{webapp}
89
90 %triggerin -- apache < 2.2.0, apache-base
91 %webapp_register httpd %{webapp}
92
93 %triggerun -- apache < 2.2.0, apache-base
94 %webapp_unregister httpd %{webapp}
95
96 %files
97 %defattr(644,root,root,755)
98 %doc README cgitrc.5.txt
99 %dir %{webappdir}
100 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit.conf
101 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit-repo.conf
102 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
103 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
104 %attr(755,root,root) %{cgibindir}/cgit.cgi
105 %attr(770,root,http) /var/cache/cgit
106 %{appdir}
This page took 0.05188 seconds and 3 git commands to generate.