install icons in kde system hicolor theme dir [release 0.8.1-3mamba;Sun Sep 15 2013]

This commit is contained in:
Silvan Calarco 2024-01-05 20:30:05 +01:00
parent 46b6d3a7ba
commit 8f654f0540
4 changed files with 293 additions and 0 deletions

View File

@ -0,0 +1,51 @@
/*
01-fedora-apper.js - Add Apper updater plasmoid to the systray
Copyright (C) 2010-2012 Kevin Kofler <kevin.kofler@chello.at>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Portions lifted from 01-kubuntu-10.04.js:
Harald Sitter, apachelogger@ubuntu.com 2010-04-02
Jonathan Riddell, jriddell@ubuntu.com 2010-02-18
Copyright Canonical Ltd, may be copied under the GNU GPL 2 or later
*/
if (userDataPath() != "/home/liveuser") {
systrayFound = false;
pids = panelIds;
for (i = 0; i < pids.length; ++i) {
p = panelById(pids[i]);
if (!p) continue;
ids = p.widgetIds;
for (j = 0; j < ids.length; ++j) {
w = p.widgetById(ids[j]);
if (!w || w.type != "systemtray") continue;
systrayFound = true;
w.currentConfigGroup = new Array("Applets");
max = 0;
for (k = 0; k < w.configGroups.length; ++k)
if (parseInt(w.configGroups[k]) > max)
max = parseInt(w.configGroups[k]);
w.currentConfigGroup = new Array("Applets", max + 1);
w.writeConfig("plugin", "org.packagekit.updater");
print("Apper updater plasmoid added to the systray");
break;
}
if (systrayFound) break;
}
if (!systrayFound)
print("No systray found");
}

View File

@ -1,2 +1,4 @@
# apper # apper
Apper (aka KPackageKit) is the KDE interface for PackageKit.

View File

@ -0,0 +1,34 @@
diff -Nru apper-0.8.1.orig/plasmoid/package/contents/ui/main.qml apper-0.8.1/plasmoid/package/contents/ui/main.qml
--- apper-0.8.1.orig/plasmoid/package/contents/ui/main.qml 2013-07-01 14:42:28.000000000 +0200
+++ apper-0.8.1/plasmoid/package/contents/ui/main.qml 2013-08-24 13:23:50.873405252 +0200
@@ -37,7 +37,7 @@
property bool checkedForUpdates: false
property string tooltipText: i18n("Software Updates")
- property string tooltipIcon: "kpackagekit-updates"
+ property string tooltipIcon: "package-update"
property Component compactRepresentation: CompactRepresentation {
text: tooltipText
@@ -164,17 +164,17 @@
function updateIcon() {
if (updatesModel.rowCount()) {
if (updatesModel.countInfo(Apper.Transaction.InfoSecurity)) {
- tooltipIcon = "kpackagekit-security"
+ tooltipIcon = "kpk-important"
} else if (updatesModel.countInfo(Apper.Transaction.InfoImportant)) {
- tooltipIcon = "kpackagekit-important"
+ tooltipIcon = "kpk-important"
} else {
- tooltipIcon = "kpackagekit-updates"
+ tooltipIcon = "package-update"
}
tooltipText = i18np("You have one update",
"You have %1 updates",
updatesModel.rowCount())
} else {
- tooltipIcon = "kpackagekit-updates"
+ tooltipIcon = "package-update"
tooltipText = i18n("Your system is up to date")
}
}

206
apper.spec Normal file
View File

@ -0,0 +1,206 @@
Name: apper
Epoch: 1
Version: 0.8.1
Release: 3mamba
Summary: A KDE interface and plasmoid for PackageKit
Group: Graphical Desktop/Applications/Administration
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.kde-apps.org/content/show.php/show.php?content=84745
Source: http://download.kde.org/stable/apper/%{version}/apper-%{version}.tar.bz2
#Source: git://anongit.kde.org/apper.git/APPER_%{version}/apper-%{version}.tar.bz2
Source1: http://pkgs.fedoraproject.org/cgit/apper.git/plain/01-fedora-org.packagekit.updater.js
Source2: apper-0.8.0-translations.tar.xz
Patch0: apper-0.8.1-plasmoid-fix-icons.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: kdelibs-devel
BuildRequires: kde-workspace-devel
BuildRequires: libgcc
BuildRequires: libpackagekit-qt2-devel
BuildRequires: libqt4-devel
BuildRequires: libQtDeclarative
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRequires: libphonon-devel
BuildRequires: automoc4
Requires: libqt4-sqlite
Provides: kpackagekit
Obsoletes: kpackagekit
Provides: packagekitgui
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Apper (aka KPackageKit) is the KDE interface for PackageKit.
%debug_package
%prep
%setup -q
#-a2
#%patch0 -p1
#cat >> CMakeLists.txt << _EOF
#include(MacroOptionalAddSubdirectory)
#macro_optional_add_subdirectory( po )
#_EOF
#-D -T
#:<< _EOF
%build
#:<< _EOF
%cmake_kde4 -d build
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
mv %{buildroot}%{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service \
%{buildroot}%{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service.KPackageKit
mv %{buildroot}%{_kde4_libdir}/apper/libapper.so %{buildroot}%{_kde4_libdir}/libapper.so
rmdir %{buildroot}%{_kde4_libdir}/apper
# fwik icons are not seached for under /animations
mv %{buildroot}%{_kde4_datadir}/apper/icons/hicolor/48x48/animations/*.png \
%{buildroot}%{_kde4_datadir}/apper/icons/hicolor/48x48/actions/
# install icons in system hicolor directory
install -d -m0755 %{buildroot}%{_kde4_icondir}
mv %{buildroot}%{_kde4_datadir}/apper/icons/hicolor \
%{buildroot}%{_kde4_icondir}/hicolor
ln -s apper %{buildroot}%{_kde4_bindir}/kpackagekit
%find_lang %{name}
%find_lang plasma_applet_org.packagekit.updater
cat plasma_applet_org.packagekit.updater.lang >> %{name}.lang
# update script to integrate packagekit updater plasmoid
install -D -m0644 %{SOURCE1} %{buildroot}%{_kde4_datadir}/plasma-desktop/updates/01-packagekit.updater.js
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
/sbin/ldconfig
touch --no-create %{_kde4_icondir}/hicolor >/dev/null 2>&1
/usr/sbin/update-alternatives --install %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service.KPackageKit 50
exit 0
%preun
if [ $1 -eq 0 ]; then
/sbin/ldconfig
/usr/sbin/update-alternatives --remove org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service.KPackageKit
fi
exit 0
%postun
if [ $1 -eq 0 ]; then
update-desktop-database -q >/dev/null 2>&1
update-mime-database %{_kde4_mimedir} >/dev/null 2>&1
touch --no-create %{_kde4_icondir}/hicolor >/dev/null 2>&1
gtk-update-icon-cache %{_kde4_icondir}/hicolor >/dev/null 2>&1
fi
:
%posttrans
# Fix an upgrade problem: alternatives removed from preun script
if [ $1 -eq 1 ]; then
/usr/sbin/update-alternatives --install %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service.KPackageKit 50
/usr/sbin/update-alternatives --auto org.freedesktop.PackageKit.service
fi
update-desktop-database -q >/dev/null 2>&1
update-mime-database %{_kde4_mimedir} >/dev/null 2>&1
gtk-update-icon-cache %{_kde4_icondir}/hicolor >/dev/null 2>&1
exit 0
%files -f %{name}.lang
%defattr(-,root,root)
%{_kde4_bindir}/apper
%{_kde4_bindir}/kpackagekit
%{_kde4_libdir}/libapper.so
%{_kde4_libdir}/kde4/kcm_apper.so
%{_kde4_libdir}/kde4/kded_apperd.so
%dir %{_kde4_libdir}/kde4/imports/org/kde/apper
%{_kde4_libdir}/kde4/imports/org/kde/apper/libapperplugin.so
%{_kde4_libdir}/kde4/imports/org/kde/apper/qmldir
%{_kde4_libexecdir}/apper-pk-session
%{_kde4_xdgappsdir}/apper.desktop
%{_kde4_xdgappsdir}/apper_installer.desktop
%{_kde4_xdgappsdir}/apper_settings.desktop
%{_kde4_xdgappsdir}/apper_updates.desktop
%{_kde4_datadir}/plasma-desktop/updates/01-packagekit.updater.js
%{_kde4_datadir}/apperd/apperd.notifyrc
%{_kde4_icondir}/hicolor/*
#%{_kde4_datadir}/apper/icons/hicolor/*/actions/*.png
#%{_kde4_datadir}/apper/icons/hicolor/*/categories/*.png
%dir %{_kde4_datadir}/plasma/plasmoids/org.packagekit.updater
%dir %{_kde4_datadir}/plasma/plasmoids/org.packagekit.updater/contents
%dir %{_kde4_datadir}/plasma/plasmoids/org.packagekit.updater/contents/ui
%{_kde4_datadir}/plasma/plasmoids/org.packagekit.updater/contents/ui/*.qml
%{_kde4_datadir}/plasma/plasmoids/org.packagekit.updater/metadata.desktop
%{_kde4_servicesdir}/plasma-applet-org.packagekit.updater.desktop
%{_kde4_servicesdir}/kcm_apper.desktop
%{_kde4_servicesdir}/kded/apperd.desktop
%{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service.KPackageKit
%{_mandir}/man1/apper.1.gz
%doc COPYING
# TODO
%changelog
* Sun Sep 15 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.1-3mamba
- install icons in kde system hicolor theme dir
* Sat Aug 24 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.1-2mamba
- update to stable release
* Mon Jul 01 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.1-1mamba
- update to 0.8.1
* Fri Mar 22 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.0-2mamba
- added update js script to install plasmoid in tray icon bar
- added upstream patches from git
* Wed Mar 06 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.0-1mamba
- update to 0.8.0
* Thu Feb 21 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.7.2-5mamba
- added a patch to fix a fatal assert on kcmdlineargs (only seen on x86_64)
* Tue Feb 19 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.7.2-4mamba
- require libqt4-sqlite (for apper-sentinel)
* Fri Jul 27 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.7.2-3mamba
- fix actions icon installation path
- added kpackagekit compatibility symlink
* Thu Jul 26 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.7.2-2mamba
- italian translations added
* Thu Jul 26 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.7.2-1mamba
- update to 0.7.2
* Sun Sep 25 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.3.3-2mamba
- provide packagekitgui
* Sat Mar 05 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.3.3-1mamba
- update to 0.6.3.3
- configure as alternative for dbus PackageKit service
* Tue Sep 28 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.1-1mamba
- update to 0.6.1
* Sat Apr 03 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.0-1mamba
- update to 0.6.0
* Mon Mar 15 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.0.svn20100301-1mamba
- update to 0.6.0.svn20100315
* Mon Mar 15 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.5.4.7z-1mamba
- package created by autospec