Home | History | Annotate | Download | only in core
      1 #
      2 # spec file for package SUNWcompiz-fusion-extra.spec
      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 erwannc
      9 #
     10 
     11 %include Solaris.inc
     12 
     13 %define OSR 8297:1.6.2
     14 
     15 %define src_name compiz-plugins-extra
     16 
     17 Name:                    SUNWcompiz-fusion-extra
     18 Summary:                 extra effects plugins for compiz
     19 Version:                 0.8.4
     20 Source:			 http://releases.compiz.org/%{version}/%{src_name}-%{version}.tar.bz2
     21 %if %build_l10n
     22 Source1:                 l10n-configure.sh
     23 %endif
     24 Patch1:			 compiz-fusion-extra-01-solaris-port.diff
     25 Patch2:			 compiz-fusion-extra-02-indiana-branding.diff
     26 Patch3:			 compiz-fusion-extra-03-compvector.diff
     27 SUNW_BaseDir:            %{_basedir}
     28 SUNW_Copyright:          %{name}.copyright
     29 
     30 %ifnarch sparc
     31 # these packages are only avavilable on x86
     32 # =========================================
     33 
     34 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     35 %include default-depend.inc
     36 BuildRequires: SUNWcompiz-bcop
     37 BuildRequires: SUNWcompiz-devel
     38 BuildRequires: SUNWcompiz-fusion-main-devel
     39 Requires: SUNWcompiz
     40 # the base pkg should depend on the -root subpkg, if there is one:
     41 Requires: %{name}-root
     42 Requires: SUNWdesktop-cache
     43 
     44 %package root
     45 Summary:                 %{summary} - / filesystem
     46 SUNW_BaseDir:            /
     47 %include default-depend.inc
     48 
     49 
     50 %package devel
     51 Summary:		 %summary - developer files
     52 sUNW_BaseDir:            %{_basedir}
     53 %include default-depend.inc
     54 Requires:		 %name
     55 
     56 
     57 %if %build_l10n
     58 %package l10n
     59 Summary:                 %{summary} - l10n files
     60 SUNW_BaseDir:            %{_basedir}
     61 %include default-depend.inc
     62 Requires:                %{name}
     63 %endif
     64 
     65 %prep
     66 # testing is the OpenGL headers and libs are installed
     67 # if this fails this mean the build machine is not
     68 # properly configured
     69 test -f /usr/X11/include/GL/glx.h || {
     70   echo "Missing OpenGL headers. Stopping."
     71   false
     72   }
     73 test -f /usr/X11/lib/modules/extensions/libglx.so  || {
     74   echo "Missing OpenGL libraries. Stopping."
     75   false
     76   }
     77 %setup -q -n %{src_name}-%version
     78 %patch1 -p1
     79 %patch2 -p1
     80 %patch3 -p1
     81 # Ensure option code is regenerated by bcop XSLT
     82 find . -name '*_options.c' -o -name '*_options.h' -exec rm -f {} \;
     83 
     84 %build
     85 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
     86 if test "x$CPUS" = "x" -o $CPUS = 0; then
     87     CPUS=1
     88 fi
     89 
     90 intltoolize --copy --force --automake
     91 
     92 %if %build_l10n
     93 bash -x %SOURCE1 --enable-copyright
     94 %endif
     95 
     96 rm -f ltmain.sh
     97 libtoolize --force
     98 aclocal
     99 autoheader
    100 automake -a -c -f
    101 autoconf
    102 
    103 export CFLAGS="%optflags"
    104 export RPM_OPT_FLAGS="$CFLAGS"
    105 export LDFLAGS="%{_ldflags}"
    106 export MSGFMT="/usr/bin/msgfmt"
    107 
    108 ./configure --prefix=%{_prefix}			\
    109 	    --bindir=%{_bindir}			\
    110 	    --sysconfdir=%{_sysconfdir}		\
    111 	    --includedir=%{_includedir}		\
    112 	    --mandir=%{_mandir}			\
    113             --libdir=%{_libdir}			\
    114 	    --enable-schemas 
    115 
    116 make -j$CPUS
    117 
    118 %install
    119 make install DESTDIR=$RPM_BUILD_ROOT
    120 rm $RPM_BUILD_ROOT%{_libdir}/compiz/*.la
    121 rm $RPM_BUILD_ROOT%{_libdir}/compiz/*.a
    122 #
    123 # when not building -l10n packages, remove anything l10n related from
    124 # $RPM_BUILD_ROOT
    125 #
    126 %if %build_l10n
    127 %else
    128 # REMOVE l10n FILES
    129 rm -r $RPM_BUILD_ROOT%{_datadir}/locale
    130 %endif
    131 
    132 %post
    133 %restart_fmri gconf-cache
    134 
    135 %clean
    136 rm -rf $RPM_BUILD_ROOT
    137 
    138 %files
    139 %defattr (-, root, bin)
    140 %dir %attr (0755, root, bin) %{_libdir}
    141 %dir %attr (0755, root, bin) %{_libdir}/compiz
    142 %{_libdir}/compiz/*
    143 %dir %attr(0755, root, sys) %{_datadir}
    144 %dir %attr(0755, root, other) %{_datadir}/compiz
    145 %{_datadir}/compiz/*
    146 %doc AUTHORS po/ChangeLog
    147 %doc(bzip2) COPYING
    148 %dir %attr (0755, root, other) %{_datadir}/doc
    149 
    150 %files root
    151 %defattr (0755, root, sys)
    152 %attr (0755, root, sys) %dir %{_sysconfdir}
    153 %{_sysconfdir}/*
    154 
    155 %files devel
    156 %defattr (-, root, bin)
    157 %dir %attr (0755,root,other) %{_libdir}/pkgconfig
    158 %{_libdir}/pkgconfig/*
    159 %dir %attr (0755, root, bin) %{_includedir}
    160 %{_includedir}/*
    161 
    162 %if %build_l10n
    163 %files l10n
    164 %defattr (-, root, other)
    165 %dir %attr (0755, root, sys) %{_datadir}
    166 %{_datadir}/locale
    167 %endif
    168 
    169 # endif for "ifnarch sparc"
    170 %endif
    171 
    172 %changelog
    173 * Fri Apr  3 2009 - laca@sun.com
    174 - use desktop-cache instead of postrun
    175 * Wed Apr 01 2009 - dave.lin@sun.com
    176 - mandatorily apply patch 03-indiana-branding.diff for both Nv & OS
    177   in order to lessen the difference between Nv & OS.
    178 * Wed Sep 16 2008 - matt.keenn@sun.com
    179 - Update copyright
    180 * Mon Apr 07 damien.carbery@sun.com
    181 - Break the build if the openGL headers and libraries are not present on the
    182   machine.
    183 * Wed Mar 26 2008 - dave.lin@sun.com
    184 - change to not build this component on SPARC
    185 * Thu Mar 20 2008 - takao.fujiwara@sun.com
    186 - Add compiz-fusion-extra-02-po.diff for ar, es, hu, ko, pt_BR and ru.
    187 * Sun Mar 09 2008 - erwann@sun.com
    188 - add standard gconf script
    189 * Wed Feb 20 2008 - damien.carbery@sun.com
    190 - Fix l10n build.
    191 * Wed Feb 13 2008 - erwann@sun.com
    192 - moved to SFO
    193 * Mon Oct 29 2007 - trisk@acm.jhu.edu
    194 - Bump to 0.6.0
    195 * Fri Sep 07 2007 - trisk@acm.jhu.edu
    196 - Fix rules
    197 * Wed Aug 29 2007 - erwann@sun.com
    198 - Initial spec
    199