[packages/pld-gitolite] - pl - unified macro usage

qboosh qboosh at pld-linux.org
Tue Jul 10 15:21:44 CEST 2012


commit 64573370799eb37e9a3c3968199fadbb04ce8f08
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jul 10 15:21:43 2012 +0200

    - pl
    - unified macro usage

 pld-gitolite.spec | 82 +++++++++++++++++++++++++++++--------------------------
 1 file changed, 43 insertions(+), 39 deletions(-)
---
diff --git a/pld-gitolite.spec b/pld-gitolite.spec
index 548dc7d..4720b65 100644
--- a/pld-gitolite.spec
+++ b/pld-gitolite.spec
@@ -1,5 +1,6 @@
 %define gituser   git
 Summary:	Gitolite setup used by PLD
+Summary(pl.UTF-8):	Konfiguracja Gitolite wykorzystywana przez PLD
 Name:		pld-gitolite
 Version:	0.11
 Release:	0.1
@@ -17,8 +18,8 @@ BuildRequires:	rpmbuild(macros) >= 1.202
 Requires:	git-core-slug
 Requires:	gitolite
 Requires:	perl-RPC-XML
-Provides:	group(%gituser)
-Provides:	user(%gituser)
+Provides:	group(%{gituser})
+Provides:	user(%{gituser})
 Requires(postun):	/usr/sbin/groupdel
 Requires(pre):	/usr/bin/getgid
 Requires(pre):	/usr/sbin/groupadd
@@ -33,6 +34,9 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %description
 Gitolite setup used by PLD Linux Distribution.
 
+%description -l pl.UTF-8
+Konfiguracja Gitolite wykorzystywana przez PLD.
+
 %prep
 %setup -qc
 mv draenog-gitolite-scripts-*/* .
@@ -40,13 +44,13 @@ mv draenog-gitolite-scripts-*/* .
 %install
 rm -rf $RPM_BUILD_ROOT
 # create directories if necessary
-install -d $RPM_BUILD_ROOT/home/services/%gituser/.gitolite/{conf,hooks/common}
+install -d $RPM_BUILD_ROOT/home/services/%{gituser}/.gitolite/{conf,hooks/common}
 
-cp -p %{SOURCE1} %{SOURCE5} $RPM_BUILD_ROOT/home/services/%gituser/.gitolite/conf
-cp -p %{SOURCE2} $RPM_BUILD_ROOT/home/services/%gituser/.gitolite.rc
-cp -p %{SOURCE3} $RPM_BUILD_ROOT/home/services/%gituser/.gitconfig
-cp -a hooks/* $RPM_BUILD_ROOT/home/services/%gituser/.gitolite/hooks/common
-cp -a adc $RPM_BUILD_ROOT/home/services/%gituser
+cp -p %{SOURCE1} %{SOURCE5} $RPM_BUILD_ROOT/home/services/%{gituser}/.gitolite/conf
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/home/services/%{gituser}/.gitolite.rc
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/home/services/%{gituser}/.gitconfig
+cp -a hooks/* $RPM_BUILD_ROOT/home/services/%{gituser}/.gitolite/hooks/common
+cp -a adc $RPM_BUILD_ROOT/home/services/%{gituser}
 
 # install additional config for gitweb package
 install -D %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/webapps/gitweb/gitweb-pld.conf
@@ -55,47 +59,47 @@ install -D %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/webapps/gitweb/gitweb-pld.co
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-%groupadd -g 264 %gituser
-%useradd -u 264 -d /home/services/%gituser -s /bin/sh -g %gituser -c "PLD Gitolite User" %gituser
+%groupadd -g 264 %{gituser}
+%useradd -u 264 -d /home/services/%{gituser} -s /bin/sh -g %{gituser} -c "PLD Gitolite User" %{gituser}
 
 %postun
 if [ "$1" = "0" ]; then
-	%userremove %gituser
-	%groupremove %gituser
+	%userremove %{gituser}
+	%groupremove %{gituser}
 fi
 
 %files
 %defattr(644,root,root,755)
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/webapps/gitweb/gitweb-pld.conf
 
-# all files owned by %gituser:%gituser
-%defattr(644,%gituser,%gituser,755)
+# all files owned by %{gituser}:%{gituser}
+%defattr(644,%{gituser},%{gituser},755)
 
-%dir /home/services/%gituser
-%config(noreplace) %verify(not md5 mtime size) /home/services/%gituser/.gitconfig
+%dir /home/services/%{gituser}
+%config(noreplace) %verify(not md5 mtime size) /home/services/%{gituser}/.gitconfig
 
-%dir /home/services/%gituser/.gitolite
-%config(noreplace) %verify(not md5 mtime size) /home/services/%gituser/.gitolite.rc
+%dir /home/services/%{gituser}/.gitolite
+%config(noreplace) %verify(not md5 mtime size) /home/services/%{gituser}/.gitolite.rc
 
-%dir /home/services/%gituser/.gitolite/conf
-%config(noreplace) %verify(not md5 mtime size) /home/services/%gituser/.gitolite/conf/gitolite.conf
-%config(noreplace) %verify(not md5 mtime size) /home/services/%gituser/.gitolite/conf/pld-developers
+%dir /home/services/%{gituser}/.gitolite/conf
+%config(noreplace) %verify(not md5 mtime size) /home/services/%{gituser}/.gitolite/conf/gitolite.conf
+%config(noreplace) %verify(not md5 mtime size) /home/services/%{gituser}/.gitolite/conf/pld-developers
 
-%dir /home/services/%gituser/.gitolite/hooks
-%dir /home/services/%gituser/.gitolite/hooks/common
-%attr(744,%gituser,%gituser) /home/services/%gituser/.gitolite/hooks/common/update.secondary
-%attr(744,%gituser,%gituser) /home/services/%gituser/.gitolite/hooks/common/post-receive
-%dir /home/services/%gituser/.gitolite/hooks/common/post-receive.d
-%attr(744,%gituser,%gituser) /home/services/%gituser/.gitolite/hooks/common/post-receive.d/setdescription.sh
-/home/services/%gituser/.gitolite/hooks/common/post-receive.python.d
-%dir /home/services/%gituser/.gitolite/hooks/common/post-receive.d/misc
-%attr(744,%gituser,%gituser) /home/services/%gituser/.gitolite/hooks/common/post-receive.d/misc/ciabot.pl
-%dir /home/services/%gituser/.gitolite/hooks/common/post-receive.d/gnome
-%attr(744,%gituser,%gituser) /home/services/%gituser/.gitolite/hooks/common/post-receive.d/gnome/gnome-post-receive-email
-/home/services/%gituser/.gitolite/hooks/common/post-receive.d/gnome/*.py
-/home/services/%gituser/.gitolite/hooks/common/post-receive.d/gnome-post-receive-email
-%dir /home/services/%gituser/adc
-%dir /home/services/%gituser/adc/bin
-%attr(744,%gituser,%gituser) /home/services/%gituser/adc/bin/create
-%attr(744,%gituser,%gituser) /home/services/%gituser/adc/bin/sskm
-/home/services/%gituser/adc/bin/adc.common-functions
+%dir /home/services/%{gituser}/.gitolite/hooks
+%dir /home/services/%{gituser}/.gitolite/hooks/common
+%attr(744,%{gituser},%{gituser}) /home/services/%{gituser}/.gitolite/hooks/common/update.secondary
+%attr(744,%{gituser},%{gituser}) /home/services/%{gituser}/.gitolite/hooks/common/post-receive
+%dir /home/services/%{gituser}/.gitolite/hooks/common/post-receive.d
+%attr(744,%{gituser},%{gituser}) /home/services/%{gituser}/.gitolite/hooks/common/post-receive.d/setdescription.sh
+/home/services/%{gituser}/.gitolite/hooks/common/post-receive.python.d
+%dir /home/services/%{gituser}/.gitolite/hooks/common/post-receive.d/misc
+%attr(744,%{gituser},%{gituser}) /home/services/%{gituser}/.gitolite/hooks/common/post-receive.d/misc/ciabot.pl
+%dir /home/services/%{gituser}/.gitolite/hooks/common/post-receive.d/gnome
+%attr(744,%{gituser},%{gituser}) /home/services/%{gituser}/.gitolite/hooks/common/post-receive.d/gnome/gnome-post-receive-email
+/home/services/%{gituser}/.gitolite/hooks/common/post-receive.d/gnome/*.py
+/home/services/%{gituser}/.gitolite/hooks/common/post-receive.d/gnome-post-receive-email
+%dir /home/services/%{gituser}/adc
+%dir /home/services/%{gituser}/adc/bin
+%attr(744,%{gituser},%{gituser}) /home/services/%{gituser}/adc/bin/create
+%attr(744,%{gituser},%{gituser}) /home/services/%{gituser}/adc/bin/sskm
+/home/services/%{gituser}/adc/bin/adc.common-functions


More information about the pld-cvs-commit mailing list