]>
Commit | Line | Data |
---|---|---|
bf1ce868 | 1 | Summary: cgit - a fast webinterface to git |
da36549f | 2 | Summary(pl.UTF-8): cgit - szybki interfejs WWW do gita |
bf1ce868 | 3 | Name: cgit |
06d5535a | 4 | Version: 0.10.2 |
8e4d6637 | 5 | Release: 1 |
bf1ce868 AG |
6 | License: GPL v2 |
7 | Group: Development/Tools | |
eda47dc4 | 8 | Source0: http://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz |
06d5535a | 9 | # Source0-md5: 6682d597f6e3e76645a254c7be537bd3 |
bf1ce868 AG |
10 | Source1: %{name}.conf |
11 | Source2: %{name}-repo.conf | |
6e601396 | 12 | Source3: %{name}-apache.conf |
ca7782e7 | 13 | Patch0: %{name}-system-git.patch |
06d5535a | 14 | Patch1: %{name}-git-2.0.3.patch |
eda47dc4 | 15 | URL: http://git.zx2c4.com/cgit/about/ |
06d5535a | 16 | BuildRequires: git-core-devel >= 2.0.3 |
0735334a | 17 | BuildRequires: lua52-devel |
bf1ce868 | 18 | BuildRequires: openssl-devel |
77429544 | 19 | BuildConflicts: zlib-devel = 1.2.5-1 |
bf1ce868 AG |
20 | Requires: webapps |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %define webapp cgit | |
24 | %define webappdir %{_sysconfdir}/webapps/%{webapp} | |
25 | %define appdir %{_datadir}/%{webapp} | |
26 | %define cgibindir %{_prefix}/lib/cgi-bin | |
27 | ||
eda47dc4 KK |
28 | %define _noautoreqfiles %{_libdir}/cgit/filters |
29 | ||
bf1ce868 AG |
30 | %description |
31 | Cgit is a CGI application implemented in C: it's basically (yet) | |
da36549f | 32 | another git command, used to generate HTML. Cgit is not forking: all |
bf1ce868 | 33 | git operations are performed by linking with libgit.a. It uses a |
da36549f | 34 | built-in cache: the generated HTML is stored on disk for the benefit |
bf1ce868 AG |
35 | of later requests. |
36 | ||
37 | %description -l pl.UTF-8 | |
da36549f JB |
38 | Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny) |
39 | interfejs do gita, generujący kod HTML. Cgit jest aplikacją | |
bf1ce868 AG |
40 | nieforkującą - wszystkie operacje na repozytoriach wykonywane są z |
41 | użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod | |
da36549f | 42 | HTML zapisany jest na dysku dla kolejnych żądań. |
bf1ce868 AG |
43 | |
44 | %prep | |
45 | %setup -q | |
46 | %patch0 -p1 | |
06d5535a | 47 | %patch1 -p1 |
eda47dc4 | 48 | cp %{_includedir}/git-core/{Makefile,config.*} git |
bf1ce868 AG |
49 | |
50 | %build | |
51 | %{__make} \ | |
eda47dc4 | 52 | V=1 \ |
bf1ce868 AG |
53 | CC="%{__cc}" \ |
54 | CFLAGS="%{rpmcflags} -I/usr/include/git-core" \ | |
55 | LDFLAGS="%{rpmldflags}" \ | |
6815c324 | 56 | LIBDIR=%{_libdir} \ |
0735334a | 57 | LUA_PKGCONFIG=lua5.2 \ |
bf1ce868 | 58 | CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \ |
08d38ec4 | 59 | CGIT_SCRIPT_PATH="%{cgibindir}" |
bf1ce868 AG |
60 | |
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
eda47dc4 KK |
64 | # The same CFLAGS as in %build stage has to be passed to avoid |
65 | # "new build flags" logic in Makefile | |
bf1ce868 | 66 | %{__make} install \ |
08d38ec4 | 67 | V=1 \ |
bf1ce868 | 68 | DESTDIR=$RPM_BUILD_ROOT \ |
08d38ec4 | 69 | prefix=%{_prefix} \ |
eda47dc4 KK |
70 | CFLAGS="%{rpmcflags} -I/usr/include/git-core" \ |
71 | CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \ | |
1807596b | 72 | CGIT_DATA_PATH="%{appdir}" \ |
08d38ec4 | 73 | CGIT_SCRIPT_PATH="%{cgibindir}" |
bf1ce868 | 74 | |
bf1ce868 AG |
75 | # cache |
76 | install -d $RPM_BUILD_ROOT/var/cache/cgit | |
77 | ||
78 | # webapp stuff | |
79 | install -d $RPM_BUILD_ROOT%{webappdir} | |
80 | install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir} | |
81 | install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir} | |
82 | install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf | |
08d38ec4 | 83 | install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf |
bf1ce868 AG |
84 | |
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
89 | %webapp_register apache %{webapp} | |
90 | ||
91 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
92 | %webapp_unregister apache %{webapp} | |
93 | ||
6e601396 | 94 | %triggerin -- apache-base |
bf1ce868 AG |
95 | %webapp_register httpd %{webapp} |
96 | ||
6e601396 | 97 | %triggerun -- apache-base |
bf1ce868 AG |
98 | %webapp_unregister httpd %{webapp} |
99 | ||
100 | %files | |
101 | %defattr(644,root,root,755) | |
102 | %doc README cgitrc.5.txt | |
103 | %dir %{webappdir} | |
104 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit.conf | |
105 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit-repo.conf | |
106 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf | |
107 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf | |
108 | %attr(755,root,root) %{cgibindir}/cgit.cgi | |
109 | %attr(770,root,http) /var/cache/cgit | |
110 | %{appdir} | |
579c7c9d JR |
111 | %dir %{_prefix}/lib/cgit |
112 | %dir %{_prefix}/lib/cgit/filters | |
eda47dc4 | 113 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/about-formatting.sh |
579c7c9d | 114 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/commit-links.sh |
33b562e6 | 115 | %attr(655,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.lua |
08d38ec4 | 116 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.py |
06d5535a | 117 | %attr(655,root,root) %{_prefix}/lib/cgit/filters/email-libravatar.lua |
33b562e6 | 118 | %attr(655,root,root) %{_prefix}/lib/cgit/filters/simple-authentication.lua |
08d38ec4 | 119 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.py |
579c7c9d | 120 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.sh |
33b562e6 ŁK |
121 | %dir %{_prefix}/lib/cgit/filters/html-converters |
122 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/man2html | |
123 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/md2html | |
124 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/rst2html | |
125 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/txt2html | |
126 | %dir %{_prefix}/lib/cgit/filters/html-converters/resources | |
127 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/resources/markdown.pl | |
128 | %attr(655,root,root) %{_prefix}/lib/cgit/filters/html-converters/resources/rst-template.txt |