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