Home | History | Annotate | Download | only in core
      1 #
      2 # spec file for package SUNWgkrellm
      3 #
      4 # Copyright 2009 Sun Microsystems, Inc.
      5 # This file and all modifications and additions to the pristine
      6 # package are under the same license as the package itself.
      7 #
      8 %define owner jouby
      9 #
     10 
     11 %include Solaris.inc
     12 
     13 %define OSR 9466:2.x
     14 
     15 Name:                SUNWgkrellm
     16 Summary:             Popular (ubiquitous) Gtk-based system monitor
     17 Version:             2.3.2
     18 License:             GPL v3
     19 Source:              http://members.dslextreme.com/users/billw/gkrellm/gkrellm-%{version}.tar.bz2
     20 Source1:                         gkrellm.desktop
     21 # date:2008-09-4 owner:jouby type:bug
     22 Patch1:              gkrellm-01-ldflags.diff
     23 # date:2008-09-4 owner:jouby type:bug
     24 Patch2:              gkrellm-02-manpage.diff
     25 # date:2008-09-4 owner:jouby type:feature 
     26 Patch3:              gkrellm-03-battery.diff
     27 # date:2008-10-10 owner:jouby type:bug
     28 Patch4:              gkrellm-04-log.diff
     29 SUNW_BaseDir:        %{_basedir}
     30 SUNW_Copyright:      %{name}.copyright
     31 BuildRoot:           %{_tmppath}/%{name}-%{version}-build
     32 
     33 %include default-depend.inc
     34 Requires:       SUNWgtk2
     35 Requires:       SUNWhal
     36 Requires:       SUNWdbus-glib
     37 Requires:       SUNWdbus-libs
     38 BuildRequires:  SUNWgtk2-devel
     39 BuildRequires:  SUNWdbus-glib-devel
     40 BuildRequires:  SUNWgnu-gettext
     41 BuildRequires:  SUNWhal
     42 
     43 %if %build_l10n
     44 %package l10n
     45 Summary:                 %{summary} - l10n files
     46 SUNW_BaseDir:            %{_basedir}
     47 %include default-depend.inc
     48 Requires:                %{name}
     49 %endif
     50 
     51 %package devel
     52 Summary:                 %{summary} - development files
     53 SUNW_BaseDir:            %{_basedir}
     54 %include default-depend.inc
     55 Requires: %name
     56 
     57 %prep
     58 %setup -q -n gkrellm-%version
     59 %patch1 -p1
     60 %patch2 -p1
     61 %patch3 -p1
     62 %patch4 -p1
     63 
     64 %build
     65 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
     66 if test "x$CPUS" = "x" -o $CPUS = 0; then
     67      CPUS=1
     68 fi
     69 
     70 export CFLAGS="%optflags"
     71 export LDFLAGS="%arch_ldadd %ldadd ${EXTRA_LDFLAGS} -L/usr/sfw/lib -R/usr/sfw/lib"
     72 export LD_OPTIONS="-L/usr/sfw/lib -R/usr/sfw/lib"
     73 
     74 make -j$CPUS enable_nls=1 LOCALEDIR=/usr/share/locale solaris
     75 
     76 %install
     77 rm -rf $RPM_BUILD_ROOT
     78 
     79 make DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} install
     80 
     81 %if %build_l10n
     82 cd po
     83 make do_nls=1 INSTALL_PREFIX=$RPM_BUILD_ROOT install
     84 cd ..
     85 %else
     86 # REMOVE l10n FILES
     87 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
     88 %endif
     89 convert gkrellm.ico gkrellm.png
     90 mv gkrellm-8.png gkrellm.png
     91 mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
     92 cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/applications
     93 mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
     94 cp gkrellm.png $RPM_BUILD_ROOT/usr/share/pixmaps
     95 
     96 %clean
     97 rm -rf $RPM_BUILD_ROOT
     98 
     99 %files
    100 %doc README
    101 %doc(bzip2) COPYING COPYRIGHT CREDITS Changelog
    102 %dir %attr (0755, root, other) %{_datadir}/doc
    103 %defattr (-, root, bin)
    104 %dir %attr (0755, root, bin) %{_bindir}
    105 %{_bindir}/gkrellm
    106 %{_bindir}/gkrellmd
    107 %dir %attr (0755, root, sys) %{_datadir}
    108 %dir %attr (0755, root, other) %{_datadir}/applications
    109 %{_datadir}/applications/*
    110 %dir %attr (0755, root, other) %{_datadir}/pixmaps
    111 %{_datadir}/pixmaps/*
    112 %dir %attr (0755, root, bin) %{_mandir}
    113 %dir %attr (0755, root, bin) %{_mandir}/man1
    114 %{_mandir}/man1/gkrellm.1
    115 %{_mandir}/man1/gkrellmd.1
    116 
    117 %if %build_l10n
    118 %files l10n
    119 %defattr (-, root, other)
    120 %dir %attr (0755, root, sys) %{_datadir}
    121 %{_datadir}/locale/*
    122 %endif
    123 
    124 %files devel
    125 %defattr (-, root, bin)
    126 %dir %attr (0755, root, other) %{_includedir}/gkrellm2
    127 %{_includedir}/gkrellm2/*.h
    128 %dir %attr (0755, root, bin) %{_libdir}
    129 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
    130 %{_libdir}/pkgconfig/gkrellm.pc
    131 
    132 %changelog
    133 * Fri Jun 26 2009 - chris.wang@sun.com
    134 - Change spec and patch owner to jouby
    135 * Thu Mar 05 2009 - brian.cameron@sun.com
    136 - Change SUNWdbus-bindings to SUNWdbus-glib.
    137 * Web Mar 04 2009 - chris.wang@sun.com
    138 - Transfer the ownership to bewitche
    139 * Thu Feb 12 2009 - halton.huo@sun.com
    140 - Update Requires/BuildRequires after running check-deps.pl, fix CR #6798922
    141 * Sat Jan 17 2009 - dave.lin@sun.com
    142 - Change "Requires: SUNWgnu-gettext"to "BuildRequires: SUNWgnu-gettext".
    143 * Wed. Oct. 22 2008 - Henry Zhang <hua.zhang@sun.com>
    144 - Bump to 2.3.2
    145 * Wed. Sep 17 2008 - Henry Zhang <hua.zhang@sun.com>
    146 - Delete locale files if not build_l10n
    147 * Fri Sep 12 2008 - takao.fujiwara@sun.com
    148 - Add l10n package.
    149 * Fri Sep 12 2008 - Henry Zhang <hua.zhang@sun.com>
    150 - Add  %doc to %files for copyright
    151 * Wed. Sep. 3 2008 - hua.zhang@sun.com
    152 - Updated spec file, bump to 2.3.1, and add patches.
    153 * Sun Nov 18 2007 - daymobrew@users.sourceforge.net
    154 - Change LDFLAGS to work for gcc. Add patch, 01-ldflags, to get LDFLAGS into
    155   the build.
    156 * Sun Nov 18 2007 - daymobrew@users.sourceforge.net
    157 - Enable building with either SUNWgnu-gettext or SFEgettext.
    158 * Fri Apr 20 2007 - dougs@truemail.co.th
    159 - Added SFW libs (LDFLAGS,LD_OPTIONS)
    160 * Mon Mar 19 2007 - dougs@truemail.co.th
    161 - Fixed -fno-omit-frame-pointer flag
    162 * Sun Mar 11 2007 - Eric Boutilier
    163 - Initial spec
    164 
    165