]> git.pld-linux.org Git - packages/cgit.git/blob - cgit.spec
rebuild with git-core-1.8.4
[packages/cgit.git] / cgit.spec
1 #
2 # Conditional build
3 %bcond_with     verbose         # verbose build (V=1)
4 #
5 Summary:        cgit - a fast webinterface to git
6 Summary(pl.UTF-8):      cgit - szybki interfejs WWW do gita
7 Name:           cgit
8 Version:        0.9.2
9 Release:        2
10 License:        GPL v2
11 Group:          Development/Tools
12 Source0:        http://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz
13 # Source0-md5:  fe11018eff8d79caad112f4fac64b90f
14 Source1:        %{name}.conf
15 Source2:        %{name}-repo.conf
16 Source3:        %{name}-apache.conf
17 Source4:        %{name}-httpd.conf
18 Patch0:         %{name}-system-git.patch
19 URL:            http://git.zx2c4.com/cgit/about/
20 BuildRequires:  git-core-devel >= 1.8.3
21 BuildRequires:  openssl-devel
22 BuildConflicts: zlib-devel = 1.2.5-1
23 Requires:       webapps
24 Conflicts:      apache-base < 2.4.0-1
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         webapp          cgit
28 %define         webappdir       %{_sysconfdir}/webapps/%{webapp}
29 %define         appdir          %{_datadir}/%{webapp}
30 %define         cgibindir       %{_prefix}/lib/cgi-bin
31
32 %define         _noautoreqfiles %{_libdir}/cgit/filters
33
34 %description
35 Cgit is a CGI application implemented in C: it's basically (yet)
36 another git command, used to generate HTML. Cgit is not forking: all
37 git operations are performed by linking with libgit.a. It uses a
38 built-in cache: the generated HTML is stored on disk for the benefit
39 of later requests.
40
41 %description -l pl.UTF-8
42 Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
43 interfejs do gita, generujący kod HTML. Cgit jest aplikacją
44 nieforkującą - wszystkie operacje na repozytoriach wykonywane są z
45 użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod
46 HTML zapisany jest na dysku dla kolejnych żądań.
47
48 %prep
49 %setup -q
50 %patch0 -p1
51 cp  %{_includedir}/git-core/{Makefile,config.*} git
52
53 %build
54 %{__make} \
55         V=1 \
56         CC="%{__cc}" \
57         CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
58         LDFLAGS="%{rpmldflags}" \
59         LIBDIR=%{_libdir} \
60         CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
61         CGIT_SCRIPT_PATH="%{cgibindir}" \
62         %{?with_verbose:V=1}
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 # The same CFLAGS as in %build  stage has to be passed to avoid
68 # "new build flags" logic in Makefile
69 %{__make} install \
70         DESTDIR=$RPM_BUILD_ROOT \
71         CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
72         CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
73         CGIT_DATA_PATH="%{appdir}" \
74         CGIT_SCRIPT_PATH="%{cgibindir}" \
75         %{?with_verbose:V=1}
76
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
85 install %{SOURCE4} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
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
96 %triggerin -- apache-base
97 %webapp_register httpd %{webapp}
98
99 %triggerun -- apache-base
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}
113 %dir %{_prefix}/lib/cgit
114 %dir %{_prefix}/lib/cgit/filters
115 %attr(755,root,root) %{_prefix}/lib/cgit/filters/about-formatting.sh
116 %attr(755,root,root) %{_prefix}/lib/cgit/filters/commit-links.sh
117 %attr(755,root,root) %{_prefix}/lib/cgit/filters//syntax-highlighting.py
118 %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.sh
119 %{_prefix}/lib/cgit/filters/html-converters
This page took 0.059643 seconds and 3 git commands to generate.