[packages/phpMyAdmin] use cp -a to ensure no new files remains unnoticed and unpackaged

glen glen at pld-linux.org
Wed Jul 22 12:32:57 CEST 2015


commit 802c40325d060919e2a3ef9d49fa800d45ff5588
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Jul 22 13:32:36 2015 +0300

    use cp -a to ensure no new files remains unnoticed and unpackaged

 phpMyAdmin.spec | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/phpMyAdmin.spec b/phpMyAdmin.spec
index d4c86d2..c2d1bfa 100644
--- a/phpMyAdmin.spec
+++ b/phpMyAdmin.spec
@@ -92,20 +92,27 @@ podręcznika MySQL). Aktualnie phpMyAdmin potrafi:
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
+# github stuff
+%{__rm} .coveralls.yml .scrutinizer.yml composer.json phpunit.xml*
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
 
-cp -p *.php *.css favicon.ico robots.txt $RPM_BUILD_ROOT%{_appdir}
-cp -a locale themes js libraries $RPM_BUILD_ROOT%{_appdir}
+cp -a . $RPM_BUILD_ROOT%{_appdir}
 
 cp -p libraries/config.default.php $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php
-ln -sf %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php
+ln -s %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php
 
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
 
+# packaged as doc
+%{__rm} $RPM_BUILD_ROOT%{_appdir}/{CONTRIBUTING.md,ChangeLog,DCO,LICENSE,README,RELEASE-DATE-*}
+# cleanup not packaged stuff
+%{__rm} -r $RPM_BUILD_ROOT%{_appdir}/{doc,examples,setup,sql}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -129,7 +136,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc ChangeLog README examples
+%doc CONTRIBUTING.md ChangeLog DCO LICENSE README examples/
 %dir %attr(750,root,http) %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/phpMyAdmin.git/commitdiff/802c40325d060919e2a3ef9d49fa800d45ff5588



More information about the pld-cvs-commit mailing list