forked from pool/hugin
f9dd536b10
Fix hugin provides for boo#952324 and boo#962214 OBS-URL: https://build.opensuse.org/request/show/357894 OBS-URL: https://build.opensuse.org/package/show/graphics/hugin?expand=0&rev=65
47 lines
1.4 KiB
Bash
47 lines
1.4 KiB
Bash
#!/bin/sh
|
|
#
|
|
# Combined library.prov, desktop-file.prov and appdata.prov for hugin
|
|
#
|
|
# Transform appdata xml file into RPM appdata(filename) provides
|
|
# Author: Michael Schroeder <mls@suse.de>
|
|
#
|
|
# Transform desktop mimetype info into RPM mimehandler(type) provides
|
|
# Author: Richard Hughes <richard@hughsie.com>
|
|
#
|
|
# Also based on library provides scripts from RPM
|
|
|
|
OLD_IFS="$IFS"
|
|
mark64=$(uname -m |grep -o 64)
|
|
|
|
while read instfile ; do
|
|
case "$instfile" in
|
|
*.desktop)
|
|
if ! grep -q '^Type=Application$' "$instfile"; then continue; fi
|
|
if ! grep -q '^Exec=' "$instfile"; then continue; fi
|
|
echo "application()"
|
|
echo "application(${instfile##*/applications/})"
|
|
mime=`grep '^MimeType=' "$instfile" | cut -d'=' -f2`
|
|
IFS=';'
|
|
for type in $mime ; do
|
|
echo 'mimehandler('$type')'
|
|
done
|
|
;;
|
|
*.appdata.xml)
|
|
echo "appdata()"
|
|
echo "appdata(${instfile##*/appdata/})"
|
|
;;
|
|
*/usr/lib$mark64/*.so.?.?)
|
|
soname=$(objdump -p $instfile | awk '/SONAME/ {print $2}')
|
|
if [ $mark64 -eq 64 ] ; then
|
|
lib64="()(64bit)" ;
|
|
else
|
|
lib64="" ;
|
|
fi
|
|
echo "$soname$lib64"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
IFS=$OLD_IFS
|
|
|