]> git.pld-linux.org Git - packages/git-core.git/commitdiff
- place system wide configuration files in %{_sysconfdir}
authorKacper Kornet <draenog@pld-linux.org>
Fri, 29 Apr 2011 13:50:37 +0000 (13:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- change default directory with templates to /etc/git-core/templates
- do not copy sample hooks to every new repo by default

Changed files:
    git-core-sysconfdir.patch -> 1.1
    git-core.spec -> 1.241

git-core-sysconfdir.patch [new file with mode: 0644]
git-core.spec

diff --git a/git-core-sysconfdir.patch b/git-core-sysconfdir.patch
new file mode 100644 (file)
index 0000000..469ba0a
--- /dev/null
@@ -0,0 +1,45 @@
+diff --git a/Makefile b/Makefile
+index cbc3fce..f5a37b5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -291,15 +291,8 @@ sharedir = $(prefix)/share
+ gitwebdir = $(sharedir)/gitweb
+ template_dir = share/git-core/templates
+ htmldir = share/doc/git-doc
+-ifeq ($(prefix),/usr)
+-sysconfdir = /etc
+ ETC_GITCONFIG = $(sysconfdir)/gitconfig
+ ETC_GITATTRIBUTES = $(sysconfdir)/gitattributes
+-else
+-sysconfdir = $(prefix)/etc
+-ETC_GITCONFIG = etc/gitconfig
+-ETC_GITATTRIBUTES = etc/gitattributes
+-endif
+ lib = lib
+ # DESTDIR=
+ pathsep = :
+@@ -1192,6 +1185,12 @@ endif
+ -include config.mak.autogen
+ -include config.mak
++ifeq ($(prefix),/usr)
++sysconfdir ?= /etc
++else
++sysconfdir ?= etc
++endif
++
+ ifdef CHECK_HEADER_DEPENDENCIES
+ COMPUTE_HEADER_DEPENDENCIES =
+ USE_COMPUTED_HEADER_DEPENDENCIES =
+diff --git a/config.mak.in b/config.mak.in
+index e378534..3006494 100644
+--- a/config.mak.in
++++ b/config.mak.in
+@@ -15,6 +15,7 @@ TCLTK_PATH = @TCLTK_PATH@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
++sysconfdir = @sysconfdir@
+ gitexecdir = @libexecdir@/git-core
+ datarootdir = @datarootdir@
+ template_dir = @datadir@/git-core/templates
index 13a55107989d24a6af4e889da838801b378cabc3..dc3777edb0c5a116c6b51a2965da0fed5efd5295 100644 (file)
@@ -22,6 +22,7 @@ Source5:      %{name}.inet
 Source6:       %{name}.init
 Patch0:                %{name}-tests.patch
 Patch1:                %{name}-key-bindings.patch
+Patch2:                %{name}-sysconfdir.patch
 URL:           http://git-scm.com/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -370,11 +371,13 @@ Ta wtyczka dostarcza podświetlanie składni dla treści commitów gita.
 %setup -q -n git-%{version}
 %patch0 -p1
 %patch1 -p0
+%patch2 -p1
 
 %build
 %{__aclocal}
 %{__autoconf}
 %configure \
+       --sysconfdir=%{_sysconfdir}/git-core \
        --with-openssl
 
 echo "BLK_SHA1=1" >> config.mak
@@ -403,6 +406,11 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name}/xdiff,%{_localstatedir}/lib/git}
 install -d $RPM_BUILD_ROOT{%{appdir},%{cgibindir},%{webappdir}}
 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/git-core
+cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/git-core/gitconfig
+[init]
+       templatedir = /etc/gitolite/templates
+EOF
 
 %{__make} install \
        INSTALLDIRS=vendor \
@@ -413,6 +421,10 @@ install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d}
        DESTDIR=$RPM_BUILD_ROOT
 %endif
 
+# copy templates except sample hooks
+cp -a $RPM_BUILD_ROOT%{_datadir}/%{name}/templates $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/templates/hooks/*.sample
+
 # header files and lib
 cp -a *.h $RPM_BUILD_ROOT%{_includedir}/%{name}
 cp -a compat $RPM_BUILD_ROOT%{_includedir}/%{name}
@@ -517,6 +529,7 @@ fi
 %attr(755,root,root) %{_bindir}/git-shell
 %attr(755,root,root) %{_bindir}/git-upload-archive
 %attr(755,root,root) %{_bindir}/git-upload-pack
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/git-core
 
 %if %{with doc}
 %{_mandir}/man1/git-*.1*
This page took 0.151089 seconds and 4 git commands to generate.