automatic version update by autodist [release 0.10.1-1mamba;Fri Feb 28 2014]

This commit is contained in:
Automatic Build System 2024-01-05 21:11:48 +01:00
parent bb6ef6b5a7
commit ff94a64f89
5 changed files with 279 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# cgit # cgit
An attempt to create a fast web interface for the git scm, using a builtin cache to decrease server io-pressure.

22
cgit-0.8.3.1-cflags.patch Normal file
View File

@ -0,0 +1,22 @@
diff -burN cgit-0.8.3.1.orig/Makefile cgit-0.8.3.1/Makefile
--- cgit-0.8.3.1.orig/Makefile 2008-12-10 09:59:24.000000000 +0100
+++ cgit-0.8.3.1/Makefile 2008-12-11 00:02:15.000000000 +0100
@@ -86,12 +86,12 @@
-include VERSION
-CFLAGS += -g -Wall -Igit
-CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)'
-CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"'
-CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
-CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
-CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"'
+override CFLAGS += -g -Wall -Igit
+override CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)'
+override CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"'
+override CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
+override CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
+override CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"'
ifdef NO_ICONV
CFLAGS += -DNO_ICONV

View File

@ -0,0 +1,39 @@
diff -Nru cgit-0.8.3.4.orig/Makefile cgit-0.8.3.4/Makefile
--- cgit-0.8.3.4.orig/Makefile 2010-09-27 08:00:47.000000000 +0200
+++ cgit-0.8.3.4/Makefile 2013-08-12 15:05:18.796843671 +0200
@@ -8,6 +8,7 @@
GIT_VER = 1.7.3
GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2
INSTALL = install
+LIBDIR := /usr/lib
# Define NO_STRCASESTR if you don't have strcasestr.
#
@@ -68,7 +69,7 @@
$(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
-EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto -lpthread
+EXTLIBS = $(LIBDIR)/libgit.a $(LIBDIR)/libgit_xdiff.a -lz -lcrypto -lpthread
OBJECTS =
OBJECTS += cache.o
OBJECTS += cgit.o
@@ -124,17 +125,13 @@
CFLAGS += -DNO_STRCASESTR
endif
-cgit: $(OBJECTS) libgit
+cgit: $(OBJECTS)
$(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS)
cgit.o: VERSION
-include $(OBJECTS:.o=.d)
-libgit:
- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 libgit.a
- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 xdiff/lib.a
-
test: all
$(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all

162
cgit.spec Normal file
View File

@ -0,0 +1,162 @@
%define cgidir %(apxs -q cgidir 2>/dev/null)
%define serverdir %(apxs -q htdocsdir 2>/dev/null)
%define gitver 1.8.3
# To create a customized installation of cgit:
# autospec -u cgit -a5 \
# -d "installdir=%serverdir/../www.example.com, \
# sitename=example, \
# adminmail=webmaster@example.com"
%if "%{?installdir}" == ""
%define installdir %{serverdir}/cgit
%endif
%if "%{?sitename}" != ""
%if "%{?servername}" == ""
%define servername %(basename %installdir 2>/dev/null)
%endif
%define cgidir %{installdir}
%define serverlogdir %(apxs -q logfiledir 2>/dev/null)
%else
%if "%{?aliasdir}" == ""
%define aliasdir /cgit
%endif
%endif
Name: %{?sitename:%sitename-website-}cgit
Version: 0.10.1
Release: 1mamba
Summary: A web frontend for git repositories
Group: Applications/Web
Vendor: openmamba
Distribution: openmamba
Packager: Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
URL: http://git.zx2c4.com/cgit/
Source: http://git.zx2c4.com/cgit/snapshot/cgit-%{version}.tar.xz
Source1: cgitrc
# cgit statically depends on a specific git version
Source2: https://git-core.googlecode.com/files/git-%{gitver}.tar.gz
Patch0: cgit-0.8.3.4-external-git.patch
Patch1: cgit-0.8.3.1-cflags.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libopenssl-devel
BuildRequires: libz-devel
BuildRequires: perl-devel
## AUTOBUILDREQ-END
Requires: cgit-common = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
An attempt to create a fast web interface for the git scm, using a builtin cache to decrease server io-pressure.
%package common
Summary: Common files provided by cgit
Group: Applications/Web
%description common
Common files provided by cgit.
%prep
%setup -q -a2
rmdir git
mv git-%{gitver} git
#% patch0 -p1
#% patch1 -p1
%build
%make V=1 \
prefix=%{_prefix} \
CGIT_SCRIPT_PATH=%{cgidir}
# CFLAGS="%{optflags} -I%{_includedir}/git-core" \
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall V=1 \
prefix=%{_prefix} \
DESTDIR=%{buildroot} \
CACHE_ROOT=%{_localstatedir}/cache/cgit \
CGIT_SCRIPT_PATH=%{cgidir} \
CGIT_DATA_PATH=%{installdir}
install -D -m0644 %{S:1} %{buildroot}%{_sysconfdir}/cgitrc
install -d %{buildroot}%{_localstatedir}/cache/cgit
install -d %{buildroot}%{_sysconfdir}/httpd/httpd.d
%if "%{?sitename}" != ""
cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{servername}.conf << EOF
%else
cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{name}.conf << EOF
%endif
%if "%{?sitename}" == ""
%if "%(dirname %installdir)" != "%{serverdir}"
Alias %{aliasdir} %{installdir}
%endif
%endif
<Directory %{installdir}>
AllowOverride All
Order allow,deny
Allow from All
Options ExecCGI
<Files cgit.cgi>
SetHandler cgi-script
</Files>
</Directory>
%if "%{?sitename}" != ""
%if "%(dirname %installdir)" != "%{serverdir}"
<VirtualHost *:80>
%{?adminmail:ServerAdmin %adminmail}
DocumentRoot %{installdir}
ServerName %{servername}
ErrorLog %{serverlogdir}/%{servername}-error_log
CustomLog %{serverlogdir}/%{servername}-access_log common
DirectoryIndex cgit.cgi
</VirtualHost>
%endif
%endif
EOF
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%if "%{?sitename}" != ""
%config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{servername}.conf
%else
%config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{name}.conf
%endif
%config(noreplace) %{_sysconfdir}/cgitrc
%{cgidir}/cgit.cgi
%{installdir}/cgit.css
%{installdir}/cgit.png
%{installdir}/favicon.ico
%{installdir}/robots.txt
%dir %attr(-,apache,root) %{_localstatedir}/cache/cgit
%files common
%defattr(-,root,root)
%dir %{_libdir}/cgit/filters
%{_libdir}/cgit/filters/*
%doc COPYING
#README cgitrc.5.txt
%changelog
* Fri Feb 28 2014 Automatic Build System <autodist@mambasoft.it> 0.10.1-1mamba
- automatic version update by autodist
* Sat Jan 18 2014 Automatic Build System <autodist@mambasoft.it> 0.10-1mamba
- automatic version update by autodist
* Mon Aug 12 2013 Automatic Build System <autodist@mambasoft.it> 0.9.2-1mamba
- update to 0.9.2
* Fri Mar 19 2010 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 0.8.3.1-1mamba
- package created by autospec

54
cgitrc Normal file
View File

@ -0,0 +1,54 @@
#
# See /usr/share/doc/cgit-*/cgitrc.5.txt for details
#
# Enable caching of up to 1000 output entries
cache-size=1000
# Specify some default clone prefixes
#clone-prefix=git://example.com ssh://example.com/pub/git http://example.com/git
# Specify the css url
css=/cgit/cgit.css
# Show extra links for each repository on the index page
enable-index-links=1
# Show number of affected files per commit on the log pages
enable-log-filecount=1
# Show number of added/removed lines per commit on the log pages
enable-log-linecount=1
# Add a cgit favicon
#favicon=/favicon.ico
# Use a custom logo
logo=/cgit/cgit.png
# Set the title and heading of the repository index page
#root-title=example.com git repositories
# Set a subheading for the repository index page
#root-desc=tracking the foobar development
# Include some more info about this site on the index page
#root-readme=/var/www/html/about.html
# Allow download of tar.gz, tar.bz2 and zip-files
#snapshots=tar.gz tar.bz2 zip
##
## List of repositories.
## PS: Any repositories listed when repo.group is unset will not be
## displayed under a group heading
## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos')
## and included like this:
## include=/etc/cgitrepos
##
#repo.url=foo
#repo.path=/var/lib/git/foo.git
#repo.desc=the master foo repository
#repo.owner=fooman@example.com
#repo.readme=info/web/about.html