1 # 2 # spec file for package SUNWdrivel 3 # 4 # includes module(s): drivel 5 # 6 # Copyright 2009 Sun Microsystems, Inc. 7 # This file and all modifications and additions to the pristine 8 # package are under the same license as the package itself. 9 # 10 # Owner: ydzhang 11 # 12 13 %include Solaris.inc 14 15 %use drivel = drivel.spec 16 17 Name: SUNWdrivel 18 Summary: Drivel - Blog Editor 19 Version: %{drivel.version} 20 SUNW_Copyright: %{name}.copyright 21 SUNW_BaseDir: %{_basedir} 22 BuildRoot: %{_tmppath}/%{name}-%{version}-build 23 Source1: %{name}-manpages-0.1.tar.gz 24 25 # these packages are only available on i386/x64 26 %ifnarch sparc 27 28 %include default-depend.inc 29 Requires: SUNWgnome-base-libs 30 Requires: SUNWgnome-libs 31 Requires: SUNWgnome-gtksourceview 32 Requires: SUNWgnome-print 33 Requires: SUNWgtkspell 34 Requires: SUNWgnu-idn 35 Requires: SUNWcurl 36 BuildRequires: SUNWgnome-base-libs-devel 37 BuildRequires: SUNWgnome-libs-devel 38 BuildRequires: SUNWgnome-gtksourceview-devel 39 BuildRequires: SUNWgnome-print-devel 40 BuildRequires: SUNWgtkspell-devel 41 42 %if %build_l10n 43 %package l10n 44 Summary: %{summary} - l10n files 45 SUNW_BaseDir: %{_basedir} 46 %include default-depend.inc 47 Requires: %{name} 48 %endif 49 50 %package root 51 Summary: %{summary} - / filesystem 52 SUNW_BaseDir: / 53 %include default-depend.inc 54 Requires: SUNWpostrun-root 55 56 %prep 57 rm -rf %name-%version 58 mkdir -p %name-%version 59 %drivel.prep -d %name-%version 60 cd %{_builddir}/%name-%version 61 gzcat %SOURCE1 | tar xf - 62 63 %build 64 export CC=/usr/sfw/bin/gcc 65 export CXX=/usr/sfw/bin/g++ 66 export CFLAGS="%gcc_optflags" 67 export CXXFLAGS="%gcc_cxx_optflags" 68 %drivel.build -d %name-%version 69 70 %install 71 rm -rf $RPM_BUILD_ROOT 72 %drivel.install -d %name-%version 73 74 # install man page 75 rm -rf $RPM_BUILD_ROOT%{_mandir} 76 cd %{_builddir}/%name-%version/sun-manpages 77 make install DESTDIR=$RPM_BUILD_ROOT 78 79 %if %build_l10n 80 %else 81 # REMOVE l10n FILES 82 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale 83 %endif 84 85 %clean 86 rm -rf $RPM_BUILD_ROOT 87 88 %post 89 %include desktop-database-install.script 90 %include icon-cache.script 91 92 %postun 93 test -x $BASEDIR/lib/postrun || exit 0 94 %include desktop-database-uninstall.script 95 96 %post root 97 %include gconf-install.script 98 99 %preun root 100 test -x $BASEDIR/var/lib/postrun/postrun || exit 0 101 ( echo 'test -x $PKG_INSTALL_ROOT/usr/bin/gconftool-2 || {'; 102 echo ' echo "WARNING: gconftool-2 not found; not uninstalling gconf schemas"'; 103 echo ' exit 0'; 104 echo '}'; 105 echo 'umask 0022'; 106 echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults'; 107 echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2'; 108 echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib'; 109 echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH'; 110 echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas'; 111 echo 'schemas="$SDIR/drivel.schemas"'; 112 echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas > /dev/null' 113 ) | $BASEDIR/var/lib/postrun/postrun -i -c JDS_wait -a 114 115 116 %files 117 %doc -d drivel-%{drivel.version} README AUTHORS 118 %doc(bzip2) -d drivel-%{drivel.version} COPYING ChangeLog po/ChangeLog NEWS 119 %dir %attr (0755, root, other) %{_datadir}/doc 120 %defattr (-, root, bin) 121 %dir %attr (0755, root, bin) %{_bindir} 122 %{_bindir}/drivel 123 %dir %attr (0755, root, sys) %{_datadir} 124 %{_datadir}/drivel 125 %dir %attr (0755, root, other) %{_datadir}/applications 126 %{_datadir}/applications/* 127 %dir %attr (0755, root, bin) %{_datadir}/omf 128 %{_datadir}/omf/drivel 129 %dir %attr (0755, root, other) %{_datadir}/pixmaps 130 %{_datadir}/pixmaps/drivel 131 %{_datadir}/pixmaps/*.png 132 %dir %attr (0755, root, other) %{_datadir}/mime-info 133 %{_datadir}/mime-info/* 134 %dir %attr (0755, root, root) %{_datadir}/mime 135 %dir %attr (0755, root, root) %{_datadir}/mime/packages 136 %{_datadir}/mime/packages/* 137 %dir %attr (0755, root, other) %{_datadir}/application-registry 138 %{_datadir}/application-registry/* 139 %dir %attr (0755, root, other) %{_datadir}/icons 140 %dir %attr (0755, root, other) %{_datadir}/icons/gnome 141 %dir %attr (0755, root, other) %{_datadir}/icons/gnome/* 142 %dir %attr (0755, root, other) %{_datadir}/icons/gnome/*/mimetypes 143 %{_datadir}/icons/gnome/*/mimetypes/* 144 %dir %attr (0755, root, other) %{_datadir}/gnome 145 %dir %attr (0755, root, bin) %{_datadir}/gnome/help 146 %dir %attr (0755, root, bin) %{_datadir}/gnome/help/drivel 147 %{_datadir}/gnome/help/drivel/C 148 %dir %attr(0755, root, bin) %{_mandir} 149 %dir %attr(0755, root, bin) %{_mandir}/* 150 %{_mandir}/*/* 151 152 %if %build_l10n 153 %files l10n 154 %defattr (-, root, bin) 155 %dir %attr (0755, root, sys) %{_datadir} 156 %attr (-, root, other) %{_datadir}/locale 157 %endif 158 159 %files root 160 %defattr (-, root, sys) 161 %attr (0755, root, sys) %dir %{_sysconfdir} 162 %{_sysconfdir}/gconf/schemas/drivel.schemas 163 164 #endif for "ifnarch sparc" 165 %endif 166 167 %changelog 168 * Mon Mar 9 2009 - david.zhang@sun.com 169 - Add ifnarch sparc so that it only build at i386/x64 platform 170 * Wed Feb 11 2009 - david.zhang@sun.com 171 - Initial spec 172