]>
Commit | Line | Data |
---|---|---|
bf1ce868 AG |
1 | # |
2 | # Conditional build | |
3 | %bcond_with verbose # verbose build (V=1) | |
4 | # | |
5 | Summary: cgit - a fast webinterface to git | |
da36549f | 6 | Summary(pl.UTF-8): cgit - szybki interfejs WWW do gita |
bf1ce868 | 7 | Name: cgit |
b5f42701 | 8 | Version: 0.8.3.3 |
740d29e2 | 9 | Release: 1 |
bf1ce868 AG |
10 | License: GPL v2 |
11 | Group: Development/Tools | |
12 | Source0: http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2 | |
b5f42701 | 13 | # Source0-md5: 30a28cb991d616970d19a5b5c470864a |
bf1ce868 AG |
14 | Source1: %{name}.conf |
15 | Source2: %{name}-repo.conf | |
16 | Source3: %{name}-httpd.conf | |
ca7782e7 AG |
17 | Patch0: %{name}-system-git.patch |
18 | Patch1: %{name}-override-cflags.patch | |
bf1ce868 | 19 | URL: http://hjemli.net/git/cgit |
adb3e92f | 20 | BuildRequires: git-core-devel >= 1.7.1-2 |
bf1ce868 | 21 | BuildRequires: openssl-devel |
77429544 | 22 | BuildConflicts: zlib-devel = 1.2.5-1 |
bf1ce868 AG |
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) | |
da36549f | 33 | another git command, used to generate HTML. Cgit is not forking: all |
bf1ce868 | 34 | git operations are performed by linking with libgit.a. It uses a |
da36549f | 35 | built-in cache: the generated HTML is stored on disk for the benefit |
bf1ce868 AG |
36 | of later requests. |
37 | ||
38 | %description -l pl.UTF-8 | |
da36549f JB |
39 | Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny) |
40 | interfejs do gita, generujący kod HTML. Cgit jest aplikacją | |
bf1ce868 AG |
41 | nieforkującą - wszystkie operacje na repozytoriach wykonywane są z |
42 | użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod | |
da36549f | 43 | HTML zapisany jest na dysku dla kolejnych żądań. |
bf1ce868 AG |
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}" \ | |
6815c324 | 55 | LIBDIR=%{_libdir} \ |
bf1ce868 AG |
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} |