]>
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 |
579c7c9d JR |
8 | Version: 0.9.1 |
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 | |
579c7c9d | 13 | # Source0-md5: 78403e6a15a61bb06cb2b8447079139a |
bf1ce868 AG |
14 | Source1: %{name}.conf |
15 | Source2: %{name}-repo.conf | |
6e601396 JR |
16 | Source3: %{name}-apache.conf |
17 | Source4: %{name}-httpd.conf | |
ca7782e7 AG |
18 | Patch0: %{name}-system-git.patch |
19 | Patch1: %{name}-override-cflags.patch | |
579c7c9d JR |
20 | Patch2: notes.patch |
21 | Patch100: git.patch | |
bf1ce868 | 22 | URL: http://hjemli.net/git/cgit |
579c7c9d | 23 | BuildRequires: git-core-devel >= 1.8.0 |
bf1ce868 | 24 | BuildRequires: openssl-devel |
77429544 | 25 | BuildConflicts: zlib-devel = 1.2.5-1 |
bf1ce868 | 26 | Requires: webapps |
6e601396 | 27 | Conflicts: apache-base < 2.4.0-1 |
bf1ce868 AG |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %define webapp cgit | |
31 | %define webappdir %{_sysconfdir}/webapps/%{webapp} | |
32 | %define appdir %{_datadir}/%{webapp} | |
33 | %define cgibindir %{_prefix}/lib/cgi-bin | |
34 | ||
35 | %description | |
36 | Cgit is a CGI application implemented in C: it's basically (yet) | |
da36549f | 37 | another git command, used to generate HTML. Cgit is not forking: all |
bf1ce868 | 38 | git operations are performed by linking with libgit.a. It uses a |
da36549f | 39 | built-in cache: the generated HTML is stored on disk for the benefit |
bf1ce868 AG |
40 | of later requests. |
41 | ||
42 | %description -l pl.UTF-8 | |
da36549f JB |
43 | Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny) |
44 | interfejs do gita, generujący kod HTML. Cgit jest aplikacją | |
bf1ce868 AG |
45 | nieforkującą - wszystkie operacje na repozytoriach wykonywane są z |
46 | użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod | |
da36549f | 47 | HTML zapisany jest na dysku dla kolejnych żądań. |
bf1ce868 AG |
48 | |
49 | %prep | |
50 | %setup -q | |
579c7c9d | 51 | %patch100 -p1 |
bf1ce868 AG |
52 | %patch0 -p1 |
53 | %patch1 -p1 | |
579c7c9d | 54 | %patch2 -p1 |
bf1ce868 AG |
55 | |
56 | %build | |
57 | %{__make} \ | |
58 | CC="%{__cc}" \ | |
59 | CFLAGS="%{rpmcflags} -I/usr/include/git-core" \ | |
60 | LDFLAGS="%{rpmldflags}" \ | |
6815c324 | 61 | LIBDIR=%{_libdir} \ |
bf1ce868 AG |
62 | CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \ |
63 | CGIT_SCRIPT_PATH="%{cgibindir}" \ | |
64 | %{?with_verbose:V=1} | |
65 | ||
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %{__make} install \ | |
70 | DESTDIR=$RPM_BUILD_ROOT \ | |
579c7c9d | 71 | LIBDIR=%{_libdir} \ |
bf1ce868 | 72 | CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \ |
1807596b | 73 | CGIT_DATA_PATH="%{appdir}" \ |
bf1ce868 AG |
74 | CGIT_SCRIPT_PATH="%{cgibindir}" \ |
75 | %{?with_verbose:V=1} | |
76 | ||
bf1ce868 AG |
77 | # cache |
78 | install -d $RPM_BUILD_ROOT/var/cache/cgit | |
79 | ||
80 | # webapp stuff | |
81 | install -d $RPM_BUILD_ROOT%{webappdir} | |
82 | install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir} | |
83 | install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir} | |
84 | install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf | |
6e601396 | 85 | install %{SOURCE4} $RPM_BUILD_ROOT%{webappdir}/httpd.conf |
bf1ce868 AG |
86 | |
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
91 | %webapp_register apache %{webapp} | |
92 | ||
93 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
94 | %webapp_unregister apache %{webapp} | |
95 | ||
6e601396 | 96 | %triggerin -- apache-base |
bf1ce868 AG |
97 | %webapp_register httpd %{webapp} |
98 | ||
6e601396 | 99 | %triggerun -- apache-base |
bf1ce868 AG |
100 | %webapp_unregister httpd %{webapp} |
101 | ||
102 | %files | |
103 | %defattr(644,root,root,755) | |
104 | %doc README cgitrc.5.txt | |
105 | %dir %{webappdir} | |
106 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit.conf | |
107 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit-repo.conf | |
108 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf | |
109 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf | |
110 | %attr(755,root,root) %{cgibindir}/cgit.cgi | |
111 | %attr(770,root,http) /var/cache/cgit | |
112 | %{appdir} | |
579c7c9d JR |
113 | %dir %{_prefix}/lib/cgit |
114 | %dir %{_prefix}/lib/cgit/filters | |
115 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/commit-links.sh | |
116 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.sh |