]> git.pld-linux.org Git - packages/cgit.git/blob - cgit.spec
e5099a04dd996d1be3ee09d5b8f3ae542f08727f
[packages/cgit.git] / cgit.spec
1 Summary:        cgit - a fast webinterface to git
2 Summary(pl.UTF-8):      cgit - szybki interfejs WWW do gita
3 Name:           cgit
4 Version:        0.10
5 Release:        1
6 License:        GPL v2
7 Group:          Development/Tools
8 Source0:        http://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz
9 # Source0-md5:  19944c17ecea1b1d1944718ce8ce6b61
10 Source1:        %{name}.conf
11 Source2:        %{name}-repo.conf
12 Source3:        %{name}-apache.conf
13 Patch0:         %{name}-system-git.patch
14 URL:            http://git.zx2c4.com/cgit/about/
15 BuildRequires:  git-core-devel >= 1.8.5
16 BuildRequires:  openssl-devel
17 BuildConflicts: zlib-devel = 1.2.5-1
18 Requires:       webapps
19 Conflicts:      apache-base < 2.4.0-1
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
27 %define         _noautoreqfiles %{_libdir}/cgit/filters
28
29 %description
30 Cgit is a CGI application implemented in C: it's basically (yet)
31 another git command, used to generate HTML. Cgit is not forking: all
32 git operations are performed by linking with libgit.a. It uses a
33 built-in cache: the generated HTML is stored on disk for the benefit
34 of later requests.
35
36 %description -l pl.UTF-8
37 Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
38 interfejs do gita, generujący kod HTML. Cgit jest aplikacją
39 nieforkującą - wszystkie operacje na repozytoriach wykonywane są z
40 użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod
41 HTML zapisany jest na dysku dla kolejnych żądań.
42
43 %prep
44 %setup -q
45 %patch0 -p1
46 cp  %{_includedir}/git-core/{Makefile,config.*} git
47
48 %build
49 %{__make} \
50         V=1 \
51         CC="%{__cc}" \
52         CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
53         LDFLAGS="%{rpmldflags}" \
54         LIBDIR=%{_libdir} \
55         CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
56         CGIT_SCRIPT_PATH="%{cgibindir}"
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60
61 # The same CFLAGS as in %build  stage has to be passed to avoid
62 # "new build flags" logic in Makefile
63 %{__make} install \
64         V=1 \
65         DESTDIR=$RPM_BUILD_ROOT \
66         prefix=%{_prefix} \
67         CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
68         CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
69         CGIT_DATA_PATH="%{appdir}" \
70         CGIT_SCRIPT_PATH="%{cgibindir}"
71
72 # cache
73 install -d $RPM_BUILD_ROOT/var/cache/cgit
74
75 # webapp stuff
76 install -d $RPM_BUILD_ROOT%{webappdir}
77 install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}
78 install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}
79 install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf
80 install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %triggerin -- apache1 < 1.3.37-3, apache1-base
86 %webapp_register apache %{webapp}
87
88 %triggerun -- apache1 < 1.3.37-3, apache1-base
89 %webapp_unregister apache %{webapp}
90
91 %triggerin -- apache-base
92 %webapp_register httpd %{webapp}
93
94 %triggerun -- apache-base
95 %webapp_unregister httpd %{webapp}
96
97 %files
98 %defattr(644,root,root,755)
99 %doc README cgitrc.5.txt
100 %dir %{webappdir}
101 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit.conf
102 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit-repo.conf
103 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
104 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
105 %attr(755,root,root) %{cgibindir}/cgit.cgi
106 %attr(770,root,http) /var/cache/cgit
107 %{appdir}
108 %dir %{_prefix}/lib/cgit
109 %dir %{_prefix}/lib/cgit/filters
110 %attr(755,root,root) %{_prefix}/lib/cgit/filters/about-formatting.sh
111 %attr(755,root,root) %{_prefix}/lib/cgit/filters/commit-links.sh
112 %attr(755,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.lua
113 %attr(755,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.py
114 %attr(755,root,root) %{_prefix}/lib/cgit/filters/simple-authentication.lua
115 %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.py
116 %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.sh
117 %{_prefix}/lib/cgit/filters/html-converters
This page took 0.041422 seconds and 2 git commands to generate.