summaryrefslogtreecommitdiff
path: root/irfanview/irfanview.spec
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-06-17 13:42:52 +0000
committerB Stack <bgstack15@gmail.com>2019-06-17 13:42:52 +0000
commit10507dce0640008f91058c34cd397569933a793f (patch)
treef0c136b3fadb44273a73c4ffa17e618c95529e16 /irfanview/irfanview.spec
parentMerge branch 'waterfox-bump' into 'master' (diff)
parentupdate irfanview-circle icon in tgz (diff)
downloadstackrpms-10507dce0640008f91058c34cd397569933a793f.tar.gz
stackrpms-10507dce0640008f91058c34cd397569933a793f.tar.bz2
stackrpms-10507dce0640008f91058c34cd397569933a793f.zip
Merge branch 'irfanview-bump' into 'master'
Fix Irfanview calling script, and icons Closes #7 See merge request bgstack15/stackrpms!67
Diffstat (limited to 'irfanview/irfanview.spec')
-rw-r--r--irfanview/irfanview.spec48
1 files changed, 23 insertions, 25 deletions
diff --git a/irfanview/irfanview.spec b/irfanview/irfanview.spec
index b693bb4..caf711e 100644
--- a/irfanview/irfanview.spec
+++ b/irfanview/irfanview.spec
@@ -6,7 +6,7 @@
Name: irfanview
Version: 4.53
-Release: 1
+Release: 2
Summary: irfanview is a graphics viewer
%define version_num %( echo %version | tr -d '\.' )
@@ -25,6 +25,7 @@ Source6: %{name}64
Source7: %{name}-vlc
Source8: i_view32.ini
Source9: %{name}-icons.tgz
+Source10: %{name}-common
Packager: Bgstack15 <bgstack15@gmail.com>
Buildarch: noarch
@@ -107,6 +108,7 @@ desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE4}
# application start and default scripts
%{__install} -p -D -m0754 %{SOURCE8} %{buildroot}%{_bindir}/%{name}-vlc
+%{__install} -p -D -m0754 %{SOURCE10} %{buildroot}%{_bindir}/%{name}-common
# man pages
pushd %{name}-bin32
@@ -116,14 +118,19 @@ popd
# icons
%{__tar} -zxvf %{SOURCE9} %{name}-circle.svg
-for shape in circle ;
+
+ff=" -filter Lanczos"
+for s in 16 22 24 32 48 64 96 128 256 ;
do
- for s in 16 22 24 32 48 64 96 128 256 ;
- do
- mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps
- convert -background none -filter Lanczos -resize ${s}x${s} %{name}-${shape}.svg %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png
- done
+ dir=%{buildroot}%{_datadir}/icons/hicolor/${s}x${s}
+ rr=" -resize ${s}x${s}"
+ mkdir -p ${dir}/apps
+ # apps
+ convert -background none ${ff} ${rr} %{name}-circle.svg ${dir}/apps/%{name}.png
+ # mimetypes
+ # none
done
+
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
cp -p %{name}-circle.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
@@ -134,13 +141,7 @@ cp -p %{name}-circle.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{n
rm -rf %{buildroot} || :
%post
-# Update icon caches
-for word in hicolor ;
-do
- touch --no-create %{_datadir}/icons/${word} || :
-done
-update-desktop-database &> /dev/null || :
-/sbin/ldconfig || :
+touch --no-create %{_datadir}/icons/hicolor 1>/dev/null 2>&1 || :
%post bin32
case "${1}" in
@@ -175,25 +176,19 @@ case "${1}" in
esac
%postun
-update-desktop-database &> /dev/null || :
if test "$1" = "0" ;
then
-
- for word in hicolor ;
- do
- touch --no-create %{_datadir}/icons/${word} &>/dev/null
- done
-
+ touch --no-create %{_datadir}/icons/hicolor 1>/dev/null 2>&1 || :
fi
-/sbin/ldconfig || :
%posttrans
-/usr/bin/gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || :
-/usr/bin/update-mime-database "%{_datadir}/mime" &>/dev/null || :
+update-desktop-database 1>/dev/null 2>&1 & :
+gtk-update-icon-cache %{_datadir}/icons/hicolor 1>/dev/null 2>&1 & :
+update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & :
%files common
%{_docdir}/%{name}
-%{_bindir}/%{name}-vlc
+%{_bindir}/%{name}-*
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/*/*
%ghost %attr(755, -, -) %{_bindir}/%{name}
@@ -209,5 +204,8 @@ fi
%{_datadir}/%{name}64
%changelog
+* Sun Jun 16 2019 B Stack <bgstack15@gmail.com> - 4.53-2
+- improve app start scripts and mimetypes
+
* Sat May 18 2019 B Stack <bgstack15@gmail.com> - 4.53-1
- version bump
bgstack15