cgit/cgit.spec
Jan Engelhardt dd71560c19 Accepting request 451575 from home:vsvecova:branches:devel:tools:scm
- Version bump to v1.1:
  * For more information see complete changelog at
    https://git.zx2c4.com/cgit/log/
- Add cgit-built-with-git-v2.11.0.patch

  * More gracefully deal with unparsable commits.
- BuildRequire xz
    There are more incorrect invocations of read_tree_recursive(),
    one example can be seen when visiting one of the 'plain' links
    This time I did what I should have done last time and checked
- Initial release, version 0.8.3.1

OBS-URL: https://build.opensuse.org/request/show/451575
OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/cgit?expand=0&rev=30
2017-01-20 10:18:37 +00:00

78 lines
2.4 KiB
RPMSpec

#
# spec file for package cgit
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define git_version 2.11.0
Name: cgit
Version: 1.1
Release: 0
Summary: A web frontend for git repositories
License: GPL-2.0
Group: Development/Tools/Version Control
Url: http://git.zx2c4.com/cgit/
#Git-Clone: https://git.zx2c4.com/cgit
Source: https://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz
Source2: https://www.kernel.org/pub/software/scm/git/git-%{git_version}.tar.xz
Source3: https://www.kernel.org/pub/software/scm/git/git-%{git_version}.tar.sign
Source4: %{name}.keyring
Source9: cgitrc
Patch0: cgit-optflags.diff
Patch1: cgit-built-with-git-v2.11.0.patch
# Requirements for cgitrc man page generation
BuildRequires: asciidoc
# Requirements for cgit
BuildRequires: libopenssl-devel
BuildRequires: libxslt
BuildRequires: libzip-devel
BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This is an attempt to create a fast web interface for the Git SCM, using a
builtin cache to decrease server I/O pressure.
%prep
%setup -qa2
%patch0 -p1
%patch1 -p1
rm -rf git
ln -s git-%{git_version} git
%build
make V=1 prefix="%{_prefix}" %{?_smp_mflags}
%install
make install install-man DESTDIR=%{buildroot} prefix="%{_prefix}" \
CGIT_SCRIPT_PATH="/srv/www/htdocs/cgit"
mkdir -p "%{buildroot}/srv/www/cgi-bin/cgit/"
mv %{buildroot}/srv/www/{htdocs,cgi-bin}/cgit/cgit.cgi
mkdir -p "%{buildroot}/%{_sysconfdir}"
cp %{SOURCE9} "%{buildroot}/%{_sysconfdir}/cgitrc"
%files
%defattr(-,root,root)
%doc README COPYING
%{_mandir}/man5/cgitrc.5%{ext_man}
/srv/www/cgi-bin/cgit/
/srv/www/htdocs/cgit/
%{_prefix}/lib/cgit/
%config(noreplace) %{_sysconfdir}/cgitrc
%changelog