Home | History | Annotate | Download | only in core
      1 #
      2 # spec file for package SUNWavant.spec
      3 #
      4 %define owner jouby
      5 #
      6 
      7 %include Solaris.inc
      8 
      9 %define OSR 9430:0.x
     10 
     11 %define X11_DIR %{_prefix}/X11
     12 %define source_name avant-window-navigator
     13 
     14 Name:           SUNWavant
     15 Summary:        Avant Window Navigator - fully customizable dock-like navigator
     16 Version:        0.3.2.1
     17 Source:		http://launchpad.net/awn/0.2/%{version}/+download/avant-window-navigator-%{version}.tar.gz
     18 License:        GPL v2, LGPL v2
     19 %if %build_l10n
     20 Source1:        l10n-configure.sh
     21 %endif
     22 URL:            http://launchpad.net/awn/
     23 SUNW_BaseDir:   %{_basedir}
     24 SUNW_Copyright: %{name}.copyright
     25 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
     26 # date:2006-06-06 type:bug owner:dkenny bugster:6887512 bugzilla:447163
     27 Patch1:         avant-01-uninit-memory.diff
     28 Source2:        %{name}-manpages-0.1.tar.gz
     29 
     30 %ifnarch sparc
     31 # these packages are only avavilable on i386/x64
     32 # ===========================================
     33 
     34 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
     35 %include	default-depend.inc
     36 Requires:       SUNWgtk2
     37 Requires:       SUNWcompiz
     38 Requires:       SUNWdbus
     39 Requires:       SUNWdesktop-cache
     40 Requires:       SUNWgnome-themes
     41 Requires:       SUNWbash
     42 Requires:       SUNWPython
     43 Requires:       SUNWgnome-python26-libs
     44 Requires:       SUNWpython26-xdg
     45 Requires:       %{name}-root
     46 BuildRequires:  SUNWgtk2-devel
     47 BuildRequires:  SUNWcompiz-devel
     48 BuildRequires:  SUNWdbus-devel
     49 BuildRequires:  SUNWxwinc
     50 BuildRequires:  SUNWPython26
     51 BuildRequires:  SUNWpython26-xdg
     52 BuildRequires:  SUNWpython26-setuptools
     53 
     54 %package devel
     55 Summary:		 %summary - developer files
     56 SUNW_BaseDir:            %{_basedir}
     57 %include default-depend.inc
     58 Requires:		 %name
     59 
     60 %package root
     61 Summary:                 %{summary} - / filesystem
     62 SUNW_BaseDir:            /
     63 %include default-depend.inc
     64 
     65 %if %build_l10n
     66 %package l10n
     67 Summary:                 %{summary} - l10n files
     68 SUNW_BaseDir:            %{_basedir}
     69 %include default-depend.inc
     70 Requires:        %{name}
     71 %endif
     72 
     73 %prep
     74 %setup -q -c -n %name-%{version}
     75 cd %{source_name}-%{version}
     76 cd %{_builddir}/%name-%version
     77 gzcat %SOURCE2 | tar xf -
     78 cd %{source_name}-%{version}
     79 %patch1 -p1
     80 cd ..
     81 
     82 %build
     83 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
     84 if test "x$CPUS" = "x" -o $CPUS = 0; then
     85     CPUS=1
     86 fi
     87 
     88 rm -rf $RPM_BUILD_ROOT
     89 mkdir $RPM_BUILD_ROOT
     90 export PKG_CONFIG_PATH=%{_prefix}/lib/pkgconfig:%{X11_DIR}/lib/pkgconfig
     91 
     92 PROTO_LIB=$RPM_BUILD_DIR/%{name}/usr/X11/lib
     93 
     94 export CFLAGS="%optflags -I%{X11_DIR}/include" 
     95 export LDFLAGS="-L$PROTO_LIB -L%{X11_DIR}/lib -R%{X11_DIR}/lib"
     96 
     97 export PYTHON=/usr/bin/python%{default_python_version}
     98 
     99 cd %{source_name}-%{version}
    100 intltoolize --force --copy --automake
    101 
    102 %if %build_l10n
    103 sh %SOURCE1 --enable-copyright
    104 %endif
    105 
    106 aclocal
    107 autoconf
    108 automake -a -c -f
    109 ./configure --prefix=%{_prefix}		\
    110 	    --bindir=%{_bindir}         \
    111 	    --sysconfdir=%{_sysconfdir}	\
    112 	    --libdir=%{_libdir}         \
    113             --includedir=%{_includedir} \
    114             --mandir=%{_mandir}   \
    115 	    --datadir=%{_datadir}	
    116 
    117 make -j$CPUS
    118 
    119 %install
    120 rm -rf $RPM_BUILD_ROOT
    121 cd %{source_name}-%{version}
    122 make install DESTDIR=$RPM_BUILD_ROOT
    123 
    124 # move to vendor-packages
    125 mkdir -p $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/vendor-packages
    126 mv $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/site-packages/* \
    127    $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/vendor-packages/
    128 rmdir $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/site-packages
    129 
    130 rm -f ${RPM_BUILD_ROOT}/x11.pc
    131 find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.a" -exec rm -f {} ';'
    132 find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.la" -exec rm -f {} ';'
    133 
    134 find $RPM_BUILD_ROOT -type f -name "*.pyo" -exec rm -f {} ';'
    135 
    136 %if %build_l10n
    137 cd $RPM_BUILD_ROOT%{_datadir}/locale
    138 # Rename dirs that are symlinks on the installed system.
    139 for ling in de_DE fi_FI fr_FR it_IT ru_RU no_NO
    140 do
    141   sling=`echo $ling | awk -F_ '{print $1}'`
    142   if [ -d $ling -a -d $sling ] ; then
    143     rm -rf $ling
    144   elif [ -d $ling ] ; then
    145     mv $ling $sling
    146   fi
    147 done
    148 %else
    149 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
    150 %endif
    151 
    152 #install man page
    153 rm -rf $RPM_BUILD_ROOT%{_mandir}
    154 cd %{_builddir}/%name-%version/sun-manpages
    155 make install DESTDIR=$RPM_BUILD_ROOT
    156 
    157 %clean
    158 rm -rf $RPM_BUILD_ROOT
    159 
    160 %post
    161 %restart_fmri icon-cache gconf-cache
    162 
    163 %files
    164 %doc -d avant-window-navigator-%{version} README AUTHORS
    165 %doc(bzip2) -d avant-window-navigator-%{version} COPYING COPYING.LIB NEWS ChangeLog
    166 %dir %attr (0755, root, other) %{_datadir}/doc
    167 %defattr (-, root, bin)
    168 %dir %attr (0755, root, bin) %{_bindir}
    169 %{_bindir}/*
    170 %dir %attr (0755, root, bin) %{_libdir}
    171 %dir %attr (0755, root, bin) %{_libdir}/python%{default_python_version}
    172 %dir %attr (0755, root, bin) %{_libdir}/python%{default_python_version}/vendor-packages
    173 %dir %attr (0755, root, bin) %{_libdir}/python%{default_python_version}/vendor-packages/awn/
    174 %{_libdir}/lib*so*
    175 %{_libdir}/python%{default_python_version}/vendor-packages/awn/*
    176 %dir %attr(0755, root, sys) %{_datadir}
    177 %dir %attr(0755, root, other) %{_datadir}/avant-window-navigator
    178 %{_datadir}/avant-window-navigator/*
    179 %dir %attr (0755, root, other) %{_datadir}/applications
    180 %{_datadir}/applications/*
    181 %dir %attr (0755, root, other) %{_datadir}/icons
    182 %dir %attr (0755, root, other) %{_datadir}/icons/hicolor/
    183 %dir %attr (0755, root, other) %{_datadir}/icons/hicolor/scalable/
    184 %dir %attr (0755, root, other) %{_datadir}/icons/hicolor/scalable/apps/
    185 %{_datadir}/icons/hicolor/scalable/apps/*
    186 %dir %attr (0755, root, other) %{_datadir}/icons/hicolor/48x48/
    187 %dir %attr (0755, root, other) %{_datadir}/icons/hicolor/48x48/apps/
    188 %{_datadir}/icons/hicolor/48x48/apps/*
    189 %dir %attr (0755, root, other) %{_datadir}/icons/hicolor/32x32/
    190 %dir %attr (0755, root, other) %{_datadir}/icons/hicolor/32x32/apps/
    191 %{_datadir}/icons/hicolor/32x32/apps/*
    192 %dir %attr (0755, root, other) %{_datadir}/icons/hicolor/24x24/
    193 %dir %attr (0755, root, other) %{_datadir}/icons/hicolor/24x24/apps/
    194 %{_datadir}/icons/hicolor/24x24/apps/*
    195 %dir %attr(0755, root, bin) %{_mandir}
    196 %{_mandir}/*/*
    197 
    198 %files devel
    199 %defattr (-, root, bin)
    200 %dir %attr (0755, root, bin) %{_includedir}
    201 %{_includedir}/*
    202 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
    203 %{_libdir}/pkgconfig/*
    204 %dir %attr (0755, root, sys) %{_datadir}
    205 %{_datadir}/gtk-doc
    206 
    207 %files root
    208 %defattr (-, root, sys)
    209 %attr (0755, root, sys) %dir %{_sysconfdir}
    210 %{_sysconfdir}/gconf/schemas/*
    211 
    212 %if %build_l10n
    213 %files l10n
    214 %defattr (-, root, bin)
    215 %dir %attr (0755, root, sys) %{_datadir}
    216 %attr (-, root, other) %{_datadir}/locale
    217 %endif
    218 
    219 # endif for "ifnarch sparc"
    220 %endif
    221 
    222 %changelog
    223 * Tur Oct 15 2009 - yuntong.jin@sun.com
    224 - use %{default_python_version} and remove .pyo file from package 
    225 * Fri Oct 09 2009 - darren.kenny@sun.com
    226 - Patch to fix bug#6887512 where awn was crashing due to uninit memory.
    227 * Tue Aug 25 2009 - brian.cameron@sun.com
    228 - Bump to 0.3.2.1.
    229 * Fri Jun 26 2009 - chris.wang@sun.com
    230 - Change owner to jouby
    231 * Thu Apr 16 2009 - chris.wang@sun.com
    232 - bump to 0.3.2 and remove upstreamed patches
    233 * Fri Apr  7 2009 - jeff.cai@sun.com
    234 - Remove dependency on SUNWpython-lxml since this package is only found in
    235   OpenSolaris.
    236 * Fri Apr  3 2009 - laca@sun.com
    237 - use desktop-cache instead of postrun
    238 * Mon Mar 23 2009 - jeff.cai@sun.com
    239 - Because /usr/bin/awn-launcher-editor (SUNWavant) requires /usr/bin/bash which
    240   is found in SUNWbash, add the dependency on SUNWbash
    241 - Because /usr/bin/awn-manager (SUNWavant) requires
    242   /usr/lib/python2.4/vendor-packages/pygtk.pyc which is found in
    243   SUNWgnome-python-libs, add the dependency on SUNWgnome-python-libs
    244 - Because /usr/bin/awn-schema-to-gconf (SUNWavant) requires
    245   /usr/lib/python2.4/vendor-packages/lxml/etree.pyc which is found in
    246   SUNWpython-lxml, add the dependency on SUNWpython-lxml
    247 * Web Mar 04 2009 - chris.wang@sun.com
    248 - Transfer the ownership to bewitche
    249 * Tue Mar 03 2009 - brian.cameron@sun.com
    250 - Use find command to remove .la and .a files.
    251 * Mon Dec 22 2008 - takao.fujiwara@sun.com
    252 - Removed duplicated language directories.
    253 * Wed Sep 17 2008 - Henry Zhang <hua.zhang@sun.com>
    254 - Add  %doc to %files for copyright
    255 * Fri Jul 25 2008 - takao.fujiwara@sun.com
    256 - Add avant-04-g11n-i18n-ui.diff to set textdomain().
    257 * Tue Jul 22 2008 - damien.carbery@sun.com
    258 - Add Build/Requires SUNWpython-xdg for python-xdg.
    259 * Fri Jul 18 2008 - damien.carbery@sun.com
    260 - Add owner, url; fix Source (s/.tar/.tar.gz/). Fix l10n packaging - Rename
    261   some locale dirs because they are symlinks on the installed system (e.g.
    262   de_DE to de).
    263 * Fri Jul 18 2008 - Henry Zhang <hua.zhang@sun.com>
    264 - Add check to ensure not build on SPARC
    265 * Tue Jul 15 2008 - Henry Zhang <hua.zhang@sun.com>
    266 - bump to 0.2.6, and fix bugs in spec file
    267 * Tue Feb 05 2008 - Moinak Ghosh <moinak.ghosh@sun.com>
    268 - Initial spec.
    269 
    270