]> git.pld-linux.org Git - packages/cgit.git/blob - cgit.spec
- specify explicitly which lua version should be used
[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.1
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:  060ef0aa95ebda6ea7daf823214bc4d0
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.9.0
16 BuildRequires:  lua52-devel
17 BuildRequires:  openssl-devel
18 BuildConflicts: zlib-devel = 1.2.5-1
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
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         LUA_PKGCONFIG=lua5.2 \
56         CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
57         CGIT_SCRIPT_PATH="%{cgibindir}"
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 # The same CFLAGS as in %build  stage has to be passed to avoid
63 # "new build flags" logic in Makefile
64 %{__make} install \
65         V=1 \
66         DESTDIR=$RPM_BUILD_ROOT \
67         prefix=%{_prefix} \
68         CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
69         CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
70         CGIT_DATA_PATH="%{appdir}" \
71         CGIT_SCRIPT_PATH="%{cgibindir}"
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-base
93 %webapp_register httpd %{webapp}
94
95 %triggerun -- 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}
109 %dir %{_prefix}/lib/cgit
110 %dir %{_prefix}/lib/cgit/filters
111 %attr(755,root,root) %{_prefix}/lib/cgit/filters/about-formatting.sh
112 %attr(755,root,root) %{_prefix}/lib/cgit/filters/commit-links.sh
113 %attr(655,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.lua
114 %attr(755,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.py
115 %attr(655,root,root) %{_prefix}/lib/cgit/filters/simple-authentication.lua
116 %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.py
117 %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.sh
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
This page took 0.079689 seconds and 4 git commands to generate.