]>
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 |
8e4d6637 ŁK |
4 | Version: 0.10.1 |
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 |
8e4d6637 | 9 | # Source0-md5: 060ef0aa95ebda6ea7daf823214bc4d0 |
bf1ce868 AG |
10 | Source1: %{name}.conf |
11 | Source2: %{name}-repo.conf | |
6e601396 | 12 | Source3: %{name}-apache.conf |
ca7782e7 | 13 | Patch0: %{name}-system-git.patch |
eda47dc4 | 14 | URL: http://git.zx2c4.com/cgit/about/ |
8e4d6637 | 15 | BuildRequires: git-core-devel >= 1.9.0 |
0735334a | 16 | BuildRequires: lua52-devel |
bf1ce868 | 17 | BuildRequires: openssl-devel |
77429544 | 18 | BuildConflicts: zlib-devel = 1.2.5-1 |
bf1ce868 AG |
19 | Requires: webapps |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %define webapp cgit | |
23 | %define webappdir %{_sysconfdir}/webapps/%{webapp} | |
24 | %define appdir %{_datadir}/%{webapp} | |
25 | %define cgibindir %{_prefix}/lib/cgi-bin | |
26 | ||
eda47dc4 KK |
27 | %define _noautoreqfiles %{_libdir}/cgit/filters |
28 | ||
bf1ce868 AG |
29 | %description |
30 | Cgit is a CGI application implemented in C: it's basically (yet) | |
da36549f | 31 | another git command, used to generate HTML. Cgit is not forking: all |
bf1ce868 | 32 | git operations are performed by linking with libgit.a. It uses a |
da36549f | 33 | built-in cache: the generated HTML is stored on disk for the benefit |
bf1ce868 AG |
34 | of later requests. |
35 | ||
36 | %description -l pl.UTF-8 | |
da36549f JB |
37 | Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny) |
38 | interfejs do gita, generujący kod HTML. Cgit jest aplikacją | |
bf1ce868 AG |
39 | nieforkującą - wszystkie operacje na repozytoriach wykonywane są z |
40 | użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod | |
da36549f | 41 | HTML zapisany jest na dysku dla kolejnych żądań. |
bf1ce868 AG |
42 | |
43 | %prep | |
44 | %setup -q | |
45 | %patch0 -p1 | |
eda47dc4 | 46 | cp %{_includedir}/git-core/{Makefile,config.*} git |
bf1ce868 AG |
47 | |
48 | %build | |
49 | %{__make} \ | |
eda47dc4 | 50 | V=1 \ |
bf1ce868 AG |
51 | CC="%{__cc}" \ |
52 | CFLAGS="%{rpmcflags} -I/usr/include/git-core" \ | |
53 | LDFLAGS="%{rpmldflags}" \ | |
6815c324 | 54 | LIBDIR=%{_libdir} \ |
0735334a | 55 | LUA_PKGCONFIG=lua5.2 \ |
bf1ce868 | 56 | CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \ |
08d38ec4 | 57 | CGIT_SCRIPT_PATH="%{cgibindir}" |
bf1ce868 AG |
58 | |
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
eda47dc4 KK |
62 | # The same CFLAGS as in %build stage has to be passed to avoid |
63 | # "new build flags" logic in Makefile | |
bf1ce868 | 64 | %{__make} install \ |
08d38ec4 | 65 | V=1 \ |
bf1ce868 | 66 | DESTDIR=$RPM_BUILD_ROOT \ |
08d38ec4 | 67 | prefix=%{_prefix} \ |
eda47dc4 KK |
68 | CFLAGS="%{rpmcflags} -I/usr/include/git-core" \ |
69 | CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \ | |
1807596b | 70 | CGIT_DATA_PATH="%{appdir}" \ |
08d38ec4 | 71 | CGIT_SCRIPT_PATH="%{cgibindir}" |
bf1ce868 | 72 | |
bf1ce868 AG |
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 | |
08d38ec4 | 81 | install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf |
bf1ce868 AG |
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 | ||
6e601396 | 92 | %triggerin -- apache-base |
bf1ce868 AG |
93 | %webapp_register httpd %{webapp} |
94 | ||
6e601396 | 95 | %triggerun -- apache-base |
bf1ce868 AG |
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} | |
579c7c9d JR |
109 | %dir %{_prefix}/lib/cgit |
110 | %dir %{_prefix}/lib/cgit/filters | |
eda47dc4 | 111 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/about-formatting.sh |
579c7c9d | 112 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/commit-links.sh |
33b562e6 | 113 | %attr(655,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.lua |
08d38ec4 | 114 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.py |
33b562e6 | 115 | %attr(655,root,root) %{_prefix}/lib/cgit/filters/simple-authentication.lua |
08d38ec4 | 116 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.py |
579c7c9d | 117 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.sh |
33b562e6 ŁK |
118 | %dir %{_prefix}/lib/cgit/filters/html-converters |
119 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/man2html | |
120 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/md2html | |
121 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/rst2html | |
122 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/txt2html | |
123 | %dir %{_prefix}/lib/cgit/filters/html-converters/resources | |
124 | %attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/resources/markdown.pl | |
125 | %attr(655,root,root) %{_prefix}/lib/cgit/filters/html-converters/resources/rst-template.txt |