SPECS: alpine.spec - adapter - drop alpineconfdir macro (pointless...

glen glen at pld-linux.org
Wed Feb 6 11:19:05 CET 2008


Author: glen                         Date: Wed Feb  6 10:19:05 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- adapter
- drop alpineconfdir macro (pointless)
- preserve /etc/alpine/alpine.conf permission in %post

---- Files affected:
SPECS:
   alpine.spec (1.53 -> 1.54) 

---- Diffs:

================================================================
Index: SPECS/alpine.spec
diff -u SPECS/alpine.spec:1.53 SPECS/alpine.spec:1.54
--- SPECS/alpine.spec:1.53	Wed Feb  6 10:20:36 2008
+++ SPECS/alpine.spec	Wed Feb  6 11:18:59 2008
@@ -3,11 +3,11 @@
 # - backport man-pages from pine.spec
 # - separate package with tcl web-frontend
 # - fix as-needed
+%define		ver		1.00
+%define		patchlevel	12
 Summary:	University of Washington Alpine mail user agent
 Summary(pl.UTF-8):	Klient pocztowy Alpine z Uniwersytetu w Waszyngtonie
 Name:		alpine
-%define		ver		1.00
-%define		patchlevel	12
 Version:	%{ver}.%{patchlevel}
 Release:	2
 Epoch:		1
@@ -42,12 +42,12 @@
 BuildRequires:	pam-devel
 # Only for web-frontend:
 #BuildRequires:	tcl-devel
-Obsoletes:	pine
-Provides:	pine = 5.00
 Suggests:	aspell
+Provides:	pine = 5.00
+Obsoletes:	pine
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		alpineconfdir	/etc/%{name}
+%define		alpineconfdir	%{_sysconfdir}/%{name}
 %define		filterout_ld	-Wl,--as-needed
 
 %description
@@ -141,8 +141,8 @@
 	--without-tcl \
 	--with-smtp-msa=%{_libdir}/sendmail \
 	--with-simple-spellcheck=aspell \
-	--with-system-pinerc=%{alpineconfdir}/%{name}.conf \
-	--with-system-fixed-pinerc=%{alpineconfdir}/%{name}.conf.fixed \
+	--with-system-pinerc=%{_sysconfdir}/%{name}/%{name}.conf \
+	--with-system-fixed-pinerc=%{_sysconfdir}/%{name}/%{name}.conf.fixed \
 	--with-krb5-dir=%{_prefix} \
 	--with-ldap-dir=%{_prefix} \
 	--with-system-mail-directory=/var/mail \
@@ -156,7 +156,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{alpineconfdir},%{_desktopdir},%{_pixmapsdir}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_desktopdir},%{_pixmapsdir}}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
@@ -167,24 +167,24 @@
 
 ln -s alpine $RPM_BUILD_ROOT%{_bindir}/pine
 
-$RPM_BUILD_ROOT%{_bindir}/alpine -conf > $RPM_BUILD_ROOT%{alpineconfdir}/alpine.conf
-cat <<EOF > $RPM_BUILD_ROOT%{alpineconfdir}/alpine.conf.fixed
+$RPM_BUILD_ROOT%{_bindir}/alpine -conf > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/alpine.conf
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/alpine.conf.fixed
 #
 # Alpine system-wide enforced configuration file - customize as needed
 #
 # This file holds the system-wide enforced values for alpine configuration
 # settings. Any values set in it will override values set in the
-# system-wide default configuration file (%{alpineconfdir}/alpine.conf) and
+# system-wide default configuration file (%{_sysconfdir}/%{name}/alpine.conf) and
 # the user's own configuration file (~/.pinerc).
 # For more information on the format of this file, read the
-# comments at the top of %{alpineconfdir}/alpine.conf
+# comments at the top of %{_sysconfdir}/%{name}/alpine.conf
 
 EOF
 
 %post
-if [ -f "%{alpineconfdir}/alpine.conf" -a -f "%{alpineconfdir}/alpine.conf.rpmnew" ]; then
-	mv %{alpineconfdir}/alpine.conf %{alpineconfdir}/alpine.conf.backup
-	alpine -P %{alpineconfdir}/alpine.conf.backup -conf > /etc/alpine/alpine.conf || exit 0
+if [ -f %{_sysconfdir}/%{name}/alpine.conf -a -f %{_sysconfdir}/%{name}/alpine.conf.rpmnew ]; then
+	cp -f %{_sysconfdir}/%{name}/alpine.conf{,.backup}
+	alpine -P %{_sysconfdir}/%{name}/alpine.conf.backup -conf > %{_sysconfdir}/%{name}/alpine.conf || :
 fi
 
 %clean
@@ -193,9 +193,9 @@
 %files
 %defattr(644,root,root,755)
 %doc README doc/tech-notes.txt
-%dir %{alpineconfdir}
-%config(noreplace) %verify(not md5 mtime size) %{alpineconfdir}/alpine.conf
-%config(noreplace) %verify(not md5 mtime size) %{alpineconfdir}/alpine.conf.fixed
+%dir %{_sysconfdir}/%{name}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/alpine.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/alpine.conf.fixed
 %attr(755,root,root) %{_bindir}/%{name}
 %attr(755,root,root) %{_bindir}/pine
 %attr(755,root,root) %{_bindir}/rpload
@@ -223,6 +223,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.54  2008-02-06 10:18:59  glen
+- adapter
+- drop alpineconfdir macro (pointless)
+- preserve /etc/alpine/alpine.conf permission in %post
+
 Revision 1.53  2008-02-06 09:20:36  blues
 - rel.2
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/alpine.spec?r1=1.53&r2=1.54&f=u



More information about the pld-cvs-commit mailing list