]> git.pld-linux.org Git - packages/cgit.git/blobdiff - cgit.spec
- up to 0.10.2
[packages/cgit.git] / cgit.spec
index 9fd38afb5d66e4fd01ff9dd40f396562524b0354..8ead37a5a2eb3573d03fcd583975e2985a598add 100644 (file)
--- a/cgit.spec
+++ b/cgit.spec
@@ -1,24 +1,22 @@
-#
-# Conditional build
-%bcond_with    verbose         # verbose build (V=1)
-#
 Summary:       cgit - a fast webinterface to git
-Summary(pl.UTF-8):     cgit - szybki interfejs webowy do git-a
+Summary(pl.UTF-8):     cgit - szybki interfejs WWW do gita
 Name:          cgit
-Version:       0.8.2
+Version:       0.10.2
 Release:       1
 License:       GPL v2
 Group:         Development/Tools
-Source0:       http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2
-# Source0-md5: 872fafaa1ea6bd9292f312878864b665
+Source0:       http://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz
+# Source0-md5: 6682d597f6e3e76645a254c7be537bd3
 Source1:       %{name}.conf
 Source2:       %{name}-repo.conf
-Source3:       %{name}-httpd.conf
+Source3:       %{name}-apache.conf
 Patch0:                %{name}-system-git.patch
-Patch1:                %{name}-override-cflags.patch
-URL:           http://hjemli.net/git/cgit
-BuildRequires: git-core-devel >= 1.6.1.1
+Patch1:                %{name}-git-2.0.3.patch
+URL:           http://git.zx2c4.com/cgit/about/
+BuildRequires: git-core-devel >= 2.0.3
+BuildRequires: lua52-devel
 BuildRequires: openssl-devel
+BuildConflicts:        zlib-devel = 1.2.5-1
 Requires:      webapps
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -27,47 +25,52 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                appdir          %{_datadir}/%{webapp}
 %define                cgibindir       %{_prefix}/lib/cgi-bin
 
+%define         _noautoreqfiles %{_libdir}/cgit/filters
+
 %description
 Cgit is a CGI application implemented in C: it's basically (yet)
-another git command, used to generate html. Cgit is not forking: all
+another git command, used to generate HTML. Cgit is not forking: all
 git operations are performed by linking with libgit.a. It uses a
-built-in cache: the generated html is stored on disk for the benefit
+built-in cache: the generated HTML is stored on disk for the benefit
 of later requests.
 
 %description -l pl.UTF-8
-Cgit to: napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
-interfejs do git-a, generujący kod html. Cgit jest aplikacją
+Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
+interfejs do gita, generujący kod HTML. Cgit jest aplikacją
 nieforkującą - wszystkie operacje na repozytoriach wykonywane są z
 użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod
-htl zapisany jest na dysku dla kolejnych żądań.
+HTML zapisany jest na dysku dla kolejnych żądań.
 
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
+cp  %{_includedir}/git-core/{Makefile,config.*} git
 
 %build
 %{__make} \
+       V=1 \
        CC="%{__cc}" \
        CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
        LDFLAGS="%{rpmldflags}" \
        LIBDIR=%{_libdir} \
+       LUA_PKGCONFIG=lua5.2 \
        CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
-       CGIT_SCRIPT_PATH="%{cgibindir}" \
-       %{?with_verbose:V=1}
+       CGIT_SCRIPT_PATH="%{cgibindir}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
+# The same CFLAGS as in %build  stage has to be passed to avoid
+# "new build flags" logic in Makefile
 %{__make} install \
+       V=1 \
        DESTDIR=$RPM_BUILD_ROOT \
-       CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \
-       CGIT_SCRIPT_PATH="%{cgibindir}" \
-       %{?with_verbose:V=1}
-
-# css and logo
-install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
-mv $RPM_BUILD_ROOT%{cgibindir}/%{name}.{css,png} $RPM_BUILD_ROOT%{appdir}
+       prefix=%{_prefix} \
+       CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
+       CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
+       CGIT_DATA_PATH="%{appdir}" \
+       CGIT_SCRIPT_PATH="%{cgibindir}"
 
 # cache
 install -d $RPM_BUILD_ROOT/var/cache/cgit
@@ -88,10 +91,10 @@ rm -rf $RPM_BUILD_ROOT
 %triggerun -- apache1 < 1.3.37-3, apache1-base
 %webapp_unregister apache %{webapp}
 
-%triggerin -- apache < 2.2.0, apache-base
+%triggerin -- apache-base
 %webapp_register httpd %{webapp}
 
-%triggerun -- apache < 2.2.0, apache-base
+%triggerun -- apache-base
 %webapp_unregister httpd %{webapp}
 
 %files
@@ -105,3 +108,21 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{cgibindir}/cgit.cgi
 %attr(770,root,http) /var/cache/cgit
 %{appdir}
+%dir %{_prefix}/lib/cgit
+%dir %{_prefix}/lib/cgit/filters
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/about-formatting.sh
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/commit-links.sh
+%attr(655,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.lua
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.py
+%attr(655,root,root) %{_prefix}/lib/cgit/filters/email-libravatar.lua
+%attr(655,root,root) %{_prefix}/lib/cgit/filters/simple-authentication.lua
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.py
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.sh
+%dir %{_prefix}/lib/cgit/filters/html-converters
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/man2html
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/md2html
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/rst2html
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/txt2html
+%dir %{_prefix}/lib/cgit/filters/html-converters/resources
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/resources/markdown.pl
+%attr(655,root,root) %{_prefix}/lib/cgit/filters/html-converters/resources/rst-template.txt
This page took 0.059505 seconds and 4 git commands to generate.