%if %{fedora} < 17 %{error: Fedora 17 or above needed. Please examine the spec file.} exit 1 %endif %global uuid system-monitor@paradoxxx.zero.gmail.com %global github paradoxxxzero-gnome-shell-system-monitor-applet %global short_name system-monitor-applet %global git 3117df5 %global gitbranch master Name: gnome-shell-extension-system-monitor-applet Version: 2.0b1 Release: 0.1%{?git:.git%{git}}%{?dist} Summary: A Gnome shell system monitor extension Group: User Interface/Desktops License: GPLv3+ URL: https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet Source0: https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/tarball/%{gitbranch}/%{github}-%{git}.tar.gz Patch0: paradoxxxzero-gnome-shell-system-monitor-applet_fix_gnome-shell_version_required.patch BuildArch: noarch Requires: gnome-shell >= 3.4.0, python, python3-gobject BuildRequires: gettext desktop-file-utils %description Display system information in gnome shell status bar, such as memory usage, CPU usage, and network rate... %prep %setup -q -n %{github}-%{git} %patch0 -p2 -b .fix_gnome-shell_version_required %build # Build translations cd po for d in `ls -d */` ; do cd $d rm -f *.mo # FIXME: horrible hack to rename errors pot file to po file if test -f *.pot -a ! -f *.po ; then for f in *.pot ; do mv $f `basename $f .pot`.po done fi # Since rpm-build package needs grep package if $(ls ./ | grep -q .po) ; then for f in *.po ; do msgfmt -o `basename $f .po`.mo $f done fi cd .. done cd .. %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/ mkdir -p %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/schemas install -D -m 0644 %{uuid}/{convenience.js,extension.js,metadata.json,prefs.js,stylesheet.css} \ %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/ install -D -m 0644 %{uuid}/schemas/{gschemas.compiled,org.gnome.shell.extensions.system-monitor.gschema.xml} \ %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/schemas/ # Translations. pushd po for d in `ls -d */` ; do pushd $d # Since rpm-build package needs grep package if $(ls ./ | grep -q .mo) ; then for f in *.mo ; do install -pD -m 0644 $f %{buildroot}%{_datadir}/locale/$d/LC_MESSAGES/$f done fi popd done popd %find_lang %{short_name} %postun #if [ -x /usr/bin/gnome-shell ] ; then # /usr/bin/gnome-shell --replace &> /dev/null || : #fi %posttrans #if [ -x /usr/bin/gnome-shell ] ; then # /usr/bin/gnome-shell --replace &> /dev/null || : #fi %files -f %{short_name}.lang %defattr(-,root,root,-) %doc README.md %{_datadir}/gnome-shell/extensions/%{uuid}/ %changelog * Wed May 30 2012 Nicolas ViƩville - 2.0b1-0.1.git3117df5 - Updated to new upstream release 2.0b1 - Completed spec file to install translations and configuration utility * Sun Jun 26 2011 Fabian Affolter - 1.92-1 - Updated to new upstream release 1.92 * Sat Jun 18 2011 Fabian Affolter - 1.90-1 - Updated to new upstream release 1.90 * Wed Jun 08 2011 Fabian Affolter - 0.99-1 - Updated to new upstream release 0.99 * Sat Jun 04 2011 Fabian Affolter - 0.9-2 - Scriplet updated - Version condition removed * Thu Jun 02 2011 Fabian Affolter - 0.9-1 - Initial package for Fedora