Home | History | Annotate | Download | only in core
      1 #
      2 # spec file for package SUNWcompiz
      3 #
      4 %define owner erwannc
      5 
      6 # NOTE: You must set up the OpenGL symlinks before building SUNWcompiz:
      7 #   #  /lib/svc/method/ogl-select start
      8 
      9 %define OSR 8297:1.6.2
     10 
     11 %include Solaris.inc
     12 Name:           SUNWcompiz
     13 Summary:        compiz
     14 Version:        0.8.4
     15 Source:		http://releases.compiz.org/%{version}/compiz-%{version}.tar.gz
     16 Source1:	http://dlc.sun.com/osol/jds/downloads/extras/compiz/compiz-session-integration-6.6.tar.bz2
     17 %if %build_l10n
     18 Source2:                 l10n-configure.sh
     19 %endif
     20 Source3:        compiz-stub-4-sparc
     21 Source4:	http://dlc.sun.com/osol/jds/downloads/extras/compiz/compiz-desktop-integration-6.8.tar.bz2
     22 Patch1:		compiz-01-solaris-port.diff
     23 Patch2:		compiz-02-sun-branding.diff
     24 Patch3:		compiz-03-indiana-branding.diff
     25 Patch4:		compiz-04-compvector.diff
     26 Patch5:		compiz-05-corexml.diff
     27 Patch6:		compiz-06-gconf-cflags.diff
     28 Patch7:		compiz-07-pthread.diff
     29 SUNW_BaseDir:   %{_basedir}
     30 SUNW_Copyright: %{name}.copyright
     31 
     32 %ifarch sparc
     33 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
     34 Requires: 	SUNWgnome-wm
     35 %prep
     36 %setup -q -c -n %{name}
     37 gtar fxvj %{SOURCE4}
     38 %build
     39 %install
     40 mkdir -p $RPM_BUILD_ROOT%{_bindir}
     41 cp %SOURCE3 $RPM_BUILD_ROOT%{_bindir}/compiz
     42 chmod 755 $RPM_BUILD_ROOT%{_bindir}/compiz
     43 mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
     44 cp compiz.desktop $RPM_BUILD_ROOT%{_datadir}/applications
     45 %clean
     46 rm -rf $RPM_BUILD_ROOT
     47 %files
     48 %defattr (-, root, bin)
     49 %dir %attr (0755, root, bin) %{_bindir}
     50 %{_bindir}/*
     51 %dir %attr(0755, root, sys) %{_datadir}
     52 %dir %attr (0755, root, other) %{_datadir}/applications
     53 %{_datadir}/applications/*
     54 %endif
     55 
     56 %ifnarch sparc
     57 # these packages are only available on x86
     58 # =========================================
     59 
     60 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
     61 %include	default-depend.inc
     62 Requires:	SUNWgtk2
     63 Requires:	%name-root
     64 Requires:       SUNWdesktop-cache
     65 Requires: 	SUNWpng
     66 Requires: 	SUNWdbus
     67 Requires: 	SUNWgnome-desktop-prefs
     68 Requires: 	SUNWgnome-panel
     69 Requires: 	SUNWgnome-wm
     70 Requires:       SUNWxwplr
     71 Requires:       SUNWperl584core
     72 Requires:       SUNWgnome-python-libs
     73 Requires:       SUNWxorg-mesa
     74 Requires:       SUNWPython
     75 BuildRequires: 	SUNWgtk2-devel
     76 BuildRequires: 	SUNWpng-devel
     77 BuildRequires: 	SUNWdbus-devel
     78 BuildRequires: 	SUNWgnome-desktop-prefs-devel
     79 BuildRequires: 	SUNWgnome-panel-devel
     80 BuildRequires: 	SUNWgnome-wm-devel
     81 BuildRequires:  SUNWxwinc
     82 BuildRequires:  SUNWxorg-mesa
     83 BuildRequires:  SUNWxwplr
     84 
     85 %package root
     86 Summary:         %summary - platform dependent files, / filesystem
     87 SUNW_BaseDir:            /
     88 %include default-depend.inc
     89 
     90 %package devel
     91 Summary:		 %summary - developer files
     92 sUNW_BaseDir:            %{_basedir}
     93 %include default-depend.inc
     94 Requires:		 %name
     95 
     96 %if %build_l10n
     97 %package l10n
     98 Summary:                 %{summary} - l10n files
     99 SUNW_BaseDir:            %{_basedir}
    100 %include default-depend.inc
    101 Requires:        %{name}
    102 %endif
    103 
    104 %prep
    105 # testing is the OpenGL headers and libs are installed
    106 # if this fails this mean the build machine is not
    107 # properly configured
    108 test -f /usr/X11/include/GL/glx.h || {
    109   echo "Missing OpenGL headers. Stopping."
    110   false
    111   }
    112 test -f /usr/X11/lib/modules/extensions/libglx.so  || {
    113   echo "Missing OpenGL libraries. Stopping."
    114   false
    115   }
    116 %setup -q -c -n %{name}
    117 gtar fxvj %{SOURCE1}
    118 gtar fxvj %{SOURCE4}
    119 cd compiz-%{version}
    120 %patch1 -p1
    121 # mandatorily apply indiana patch for both Nv & OS in
    122 # order to lessen the difference between Nv & OS
    123 #%if %option_with_sun_branding
    124 #%patch2 -p1
    125 #%endif
    126 #%if %option_with_indiana_branding
    127 %patch3 -p1
    128 #%endif
    129 %patch4 -p1
    130 %patch5 -p1
    131 %patch6 -p1
    132 %patch7 -p1
    133 cd ..
    134 
    135 %build
    136 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
    137 if test "x$CPUS" = "x" -o $CPUS = 0; then
    138     CPUS=1
    139 fi
    140 
    141 PROTO_LIB=$RPM_BUILD_DIR/%{name}/usr/X11/lib
    142 PROTO_INC=$RPM_BUILD_DIR/%{name}/usr/X11/include
    143 PROTO_PKG=$RPM_BUILD_DIR/%{name}/usr/X11/lib/pkgconfig
    144 
    145 export PKG_CONFIG_PATH="$PROTO_PKG"
    146 
    147 export CFLAGS="%optflags -I$PROTO_INC -I/usr/include/startup-notification-1.0 -I/usr/X11/include"
    148 export LDFLAGS="-L$PROTO_LIB -L/usr/X11/lib -R/usr/X11/lib"
    149 
    150 cd compiz-%{version}
    151 
    152 intltoolize --copy --force --automake
    153 
    154 %if %build_l10n
    155 bash -x %SOURCE2 --enable-copyright
    156 %endif
    157 
    158 aclocal
    159 autoheader
    160 automake -a -c -f
    161 autoconf
    162 libtoolize --force
    163 
    164 export CFLAGS="%optflags -I$PROTO_INC -I/usr/include/startup-notification-1.0 -I/usr/X11/include" 
    165 export LDFLAGS="-L$PROTO_LIB -L/usr/X11/lib -L/usr/openwin/lib -R/usr/X11/lib -R/usr/openwin/lib -lX11 -lXext"
    166 
    167 ./configure --prefix=%{_prefix}		\
    168 	    --bindir=%{_bindir}         \
    169 	    --sysconfdir=%{_sysconfdir}	\
    170 	    --libdir=%{_libdir}         \
    171             --includedir=%{_includedir} \
    172 	    --datadir=%{_datadir}	\
    173 	    --enable-gnome 		\
    174 	    --without-xcb		\
    175 	    --with-default-plugins=core,dbus,move,place,png,regex,resize,svg,switcher,imgjpeg,resizeinfo,session,text,workarounds,decoration,animation,wall,fade
    176 
    177 make -j$CPUS
    178 
    179 %install
    180 rm -rf $RPM_BUILD_ROOT
    181 
    182 cd compiz-%{version}
    183 make install DESTDIR=$RPM_BUILD_ROOT
    184 cd ..
    185 
    186 find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.a" -exec rm -f {} ';'
    187 find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.la" -exec rm -f {} ';'
    188 rm -f $RPM_BUILD_ROOT/usr/X11/lib/*.la
    189 rm -rf $RPM_BUILD_ROOT%{_basedir}/etc
    190 
    191 mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
    192 cp compiz.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
    193 mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
    194 cp compiz.desktop $RPM_BUILD_ROOT%{_datadir}/applications
    195 
    196 cp compiz-configure.in compiz-configure
    197 cat compiz-configure.in | sed "s:@prefix_lib@:%{_libdir}:" | sed "s:@prefix_data@:%{_datadir}:" > compiz-configure
    198 
    199 cp compiz-configure modify-xorg-conf xglxtest $RPM_BUILD_ROOT%{_libdir}/compiz
    200 cp compiz-config.glade $RPM_BUILD_ROOT%{_datadir}/compiz
    201 
    202 mv $RPM_BUILD_ROOT%{_bindir}/compiz $RPM_BUILD_ROOT%{_bindir}/compiz-bin
    203 cp compiz $RPM_BUILD_ROOT%{_bindir}
    204 
    205 %if %build_l10n
    206 %else
    207 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
    208 %endif
    209 
    210 %post
    211 %restart_fmri gconf-cache
    212 
    213 %clean
    214 rm -rf $RPM_BUILD_ROOT
    215 
    216 %files
    217 %defattr (-, root, bin)
    218 %dir %attr (0755, root, bin) %{_bindir}
    219 %{_bindir}/*
    220 %dir %attr (0755, root, bin) %{_libdir}
    221 %dir %attr (0755, root, bin) %{_libdir}/compiz
    222 %dir %attr (0755, root, bin) %{_libdir}/window-manager-settings
    223 %{_libdir}/lib*so*
    224 %{_libdir}/compiz/*
    225 %{_libdir}/window-manager-settings/*
    226 %dir %attr(0755, root, sys) %{_datadir}
    227 %dir %attr(0755, root, other) %{_datadir}/compiz
    228 %dir %attr(0755, root, other) %{_datadir}/gnome
    229 %dir %attr(0755, root, bin) %{_datadir}/gnome/wm-properties
    230 %dir %attr(0755, root, bin) %{_datadir}/gnome-control-center
    231 %dir %attr(0755, root, bin) %{_datadir}/gnome-control-center/keybindings
    232 %dir %attr (0755, root, other) %{_datadir}/pixmaps
    233 %dir %attr (0755, root, other) %{_datadir}/applications
    234 %{_datadir}/compiz/*
    235 %{_datadir}/gnome/wm-properties/*
    236 %{_datadir}/gnome-control-center/keybindings/*
    237 %{_datadir}/pixmaps/*
    238 %{_datadir}/applications/*
    239 %doc -d compiz-%{version} AUTHORS COPYING README
    240 %doc(bzip2) -d compiz-%{version} COPYING.GPL COPYING.LGPL COPYING.MIT NEWS
    241 %doc(bzip2) -d compiz-%{version} ChangeLog po/ChangeLog
    242 %dir %attr (0755, root, other) %{_datadir}/doc
    243 
    244 %files root
    245 %defattr (0755, root, sys)
    246 %attr (0755, root, sys) %dir %{_sysconfdir}
    247 %{_sysconfdir}/gconf/schemas/*
    248 
    249 %files devel
    250 %defattr (-, root, bin)
    251 %dir %attr (0755, root, bin) %{_includedir}
    252 %{_includedir}/*
    253 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
    254 %{_libdir}/pkgconfig/*
    255 
    256 %if %build_l10n
    257 %files l10n
    258 %defattr (-, root, bin)
    259 %dir %attr (0755, root, sys) %{_datadir}
    260 %attr (-, root, other) %{_datadir}/locale
    261 %endif
    262 
    263 # endif for "ifnarch sparc"
    264 %endif
    265 
    266 %changelog
    267 * Fri Sep 07 2009 - dave.lin@sun.com
    268 - Add patch 06-gconf-cflags.diff to fix path issue.
    269 * Thu Aug 13 2009 - christian.kelly@sun.com
    270 - Bump to 0.8.2.
    271 * Fri Jul 17 2009 - matt.keenan@sun.com
    272 - Bump compiz-desktop-integration tarball to 6.6 fix #10108
    273 * Fri Apr  3 2009 - laca@sun.com
    274 - use desktop-cache instead of postrun
    275 * Wed Apr 01 2009 - dave.lin@sun.com
    276 - mandatorily apply patch 03-indiana-branding.diff for both Nv & OS
    277   in order to lessen the difference between Nv & OS(doo4284).
    278 * Mon Mar 23 2009 - jeff.cai@sun.com
    279 - Because /usr/lib/compiz/compiz-configure (SUNWcompiz) requires
    280   /usr/bin/i86/isapython2.4 which is found in SUNWPython, add the
    281   dependency on SUNWPython
    282 * Wed Mar 11 2009 - matt.keenan@sun.com
    283 - Bump compiz-desktop-integration tarball to 6.3 fix #7287
    284 * Fri Feb 27 2009 - matt.keenan@sun.com
    285 - Bump integration tarball to 6.2 fix #6967
    286 * Wed Feb 11 2009 - matt.keenan@sun.com
    287 - Remove compiz-by-default and compiz-by-default.desktop references, now
    288   delivered by gnome-session as they need to be compiz package independent
    289 * Fri Feb 06 2009 - matt.keenan@sun.com
    290 - Bump integration tarball to 6, for compiz-by-default bugs
    291 * Tue Feb 03 2009 - matt.keenan@sun.com
    292 - Bump integration tarball to 4, for compiz-by-default
    293 - Add compiz-by-default to %files
    294 * Mon Sep 22 2008 - erwann@sun.com
    295 - Bumped integration tarball to add desktop file
    296 * Wed Sep 16 2008 - matt.keenn@sun.com
    297 - Update copyright
    298 * Wed May 21 2008 - damien.carbery@sun.com
    299 - Add 'Requires: SUNWxorg-mesa' after check-deps.pl run.
    300 * Mon Apr 07 2008 - damien.carbery@sun.com
    301 - Break the build if the openGL headers and libraries are not present on the
    302   machine.
    303 * Thu Mar 27 2008 - damien.carbery@sun.com
    304 - Add Build/Requires SUNWgnome-desktop-prefs/-devel and SUNWgnome-panel/-devel
    305   to ensure GNOME support built. Add --enable-gnome to configure to be doubly
    306   sure.
    307 * Wed Mar 26 2008 - dave.lin@sun.com
    308 - change to not build this component on SPARC
    309 * Tue Mar 11 2008 - erwann@sun.com
    310 - removed missing X server pc and header file as they are available in
    311   nevada build 85
    312 * Sun Mar 09 2008 - erwann@sun.com
    313 - add standard gconf script and Perl and Pyhton deps for the config scripts
    314 * Thu Feb 21 2008 - laca@sun.com
    315 - do not install Xregion.h if it already exists (on Indiana)
    316 * Wed Feb 20 2008 - damien.carbery@sun.com
    317 - Remove NVDAgraphics dependency as it is not needed - ogl-select service sets
    318   up the required links. Add SUNWwxplr as it delivers ogl-select.
    319 * Wed Feb 13 2008 - erwann@sun.com
    320 - cleanup for spec-file-other integration
    321 * Sun Nov 04 2007 - erwann@sun.com
    322 - remove unneeded X bits
    323 - lighter version of missing-stuff
    324 - ship missing X header
    325 * Mon Oct 29 2007 - trisk@acm.jhu.edu
    326 - Bump to 0.6.2
    327 - Don't create icons in gnome-integration (use fusion-icon)
    328 * Tue Oct 16 2007 - laca (at] sun.com
    329 - add FOX build support
    330 * Fri Sep 21 2007 - Albert Lee <trisk (at] acm.jhu.edu>
    331 - Add optional patch for "black windows" workaround
    332 - Fix install in GNOME 2.19/2.20
    333 * Thu Sep 06 2007 - Albert Lee <trisk (at] acm.jhu.edu>
    334 - Updated to coexist with newer X consolidation packages
    335 * Wed Mar 08 2007 - Doug Scott <dougs at truemail.co.th>
    336 - Changed to build on un-modified system
    337 * Tue Mar 06 2007 - mike kiedrowski (lakeside-AT-cybrzn-DOT-com)
    338 - Initial spec
    339 
    340