commit 41265dd134c2965a96446e0243980849bf42d9fe
Author: Jakub Bogusz <[email protected]>
Date:   Sat Dec 19 09:12:52 2020 +0100

    - examples are installed now, package them

 qt5-qtserialport.spec | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/qt5-qtserialport.spec b/qt5-qtserialport.spec
index 8ceffae..fae0282 100644
--- a/qt5-qtserialport.spec
+++ b/qt5-qtserialport.spec
@@ -131,6 +131,7 @@ qmake-qt5
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} install \
        INSTALL_ROOT=$RPM_BUILD_ROOT
 
@@ -144,6 +145,31 @@ rm -rf $RPM_BUILD_ROOT
 # actually drop *.la, follow policy of not packaging them when *.pc exist
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
 
+# Prepare some files list
+ifecho() {
+       r="$RPM_BUILD_ROOT$2"
+       if [ -d "$r" ]; then
+               echo "%%dir $2" >> $1.files
+       elif [ -x "$r" ] ; then
+               echo "%%attr(755,root,root) $2" >> $1.files
+       elif [ -f "$r" ]; then
+               echo "$2" >> $1.files
+       else
+               echo "Error generation $1 files list!"
+               echo "$r: no such file or directory!"
+               return 1
+       fi
+}
+ifecho_tree() {
+       ifecho $1 $2
+       for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
+               ifecho $1 $2/$f
+       done
+}
+
+echo "%defattr(644,root,root,755)" > examples.files
+ifecho_tree examples %{_examplesdir}/qt5/serialport
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -176,5 +202,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_docdir}/qt5-doc/qtserialport.qch
 %endif
 
-# examples not installed
-#%files examples -f examples.files
+%files examples -f examples.files
+%defattr(644,root,root,755)
+# XXX: dir shared with qt5-qtbase-examples
+%dir %{_examplesdir}/qt5
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qt5-qtserialport.git/commitdiff/41265dd134c2965a96446e0243980849bf42d9fe

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to