Home | History | Annotate | Download | only in gnome-2-24
      1 #
      2 # spec file for package SUNWgnome-a11y-libs
      3 #
      4 # includes module(s): at-spi java-access-bridge libgail-gnome freetts gnome-mag
      5 #
      6 # Copyright 2007 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: liyuan 
     11 #
     12 %include Solaris.inc
     13 
     14 %ifarch amd64 sparcv9
     15 %include arch64.inc
     16 %use at_spi_64 = at-spi.spec
     17 %endif
     18 
     19 %include base.inc
     20 %use at_spi = at-spi.spec
     21 %use libgail_gnome = libgail-gnome.spec
     22 %if %option_with_java
     23 %use java_access_bridge = java-access-bridge.spec
     24 %endif
     25 %use freetts = freetts.spec
     26 %use gnome_mag = gnome-mag.spec
     27 
     28 Name:                    SUNWgnome-a11y-libs
     29 Summary:                 Accessibility implementation for GNOME
     30 Version:                 %{default_pkg_version}
     31 Source:                  %{name}-manpages-0.1.tar.gz
     32 SUNW_BaseDir:            %{_basedir}
     33 SUNW_Copyright:          %{name}.copyright
     34 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     35 
     36 %include default-depend.inc
     37 Requires: SUNWgnome-libs
     38 Requires: SUNWgnome-panel
     39 Requires: SUNWgnome-component
     40 Requires: SUNWgnome-base-libs
     41 Requires: SUNWgnome-config
     42 Requires: SUNWlibms
     43 Requires: SUNWlibpopt
     44 Requires: SUNWj5rt
     45 Requires: SUNWj6rt
     46 Requires: SUNWzoner
     47 Requires: SUNWzoneu
     48 Requires: SUNWpkgcmdsu
     49 
     50 BuildRequires: SUNWgnome-base-libs-devel
     51 BuildRequires: SUNWgnome-config-devel
     52 BuildRequires: SUNWlibpopt-devel
     53 BuildRequires: SUNWgnome-panel-devel
     54 BuildRequires: SUNWgnome-libs-devel
     55 BuildRequires: SUNWgnome-panel-devel
     56 BuildRequires: SUNWgnome-component-devel
     57 BuildRequires: SUNWpython-setuptools
     58 
     59 %package root
     60 Summary:                 %{summary} - / filesystem
     61 SUNW_BaseDir:            /
     62 %include default-depend.inc
     63 
     64 %package devel
     65 Summary:                 %{summary} - development files
     66 SUNW_BaseDir:            %{_basedir}
     67 %include default-depend.inc
     68 Requires: SUNWperl584usr
     69 Requires: SUNWgnome-base-libs-devel
     70 Requires: SUNWgnome-libs-devel
     71 
     72 %if %build_l10n
     73 %package l10n
     74 Summary:                 %{summary} - l10n files
     75 SUNW_BaseDir:            %{_basedir}
     76 %include default-depend.inc
     77 Requires:                %{name}
     78 %endif
     79 
     80 %prep
     81 rm -rf %name-%version
     82 mkdir %name-%version
     83 
     84 %ifarch amd64 sparcv9
     85 mkdir %name-%version/%_arch64
     86 %at_spi_64.prep -d %name-%version/%_arch64
     87 %endif
     88 
     89 mkdir %name-%version/%base_arch
     90 %at_spi.prep -d %name-%version/%base_arch
     91 %libgail_gnome.prep -d %name-%version/%base_arch
     92 %if %option_with_java
     93 %java_access_bridge.prep -d %name-%version/%base_arch
     94 %endif
     95 %freetts.prep -d %name-%version/%base_arch
     96 %gnome_mag.prep -d %name-%version/%base_arch
     97 cd %{_builddir}/%name-%version
     98 gzcat %SOURCE0 | tar xf -
     99 
    100 %build
    101 PKG_CONFIG_DISABLE_UNINSTALLED=
    102 unset PKG_CONFIG_DISABLE_UNINSTALLED
    103 export PKG_CONFIG_PATH="../at-spi-%{at_spi.version}:%{_pkg_config_path}"
    104 export CFLAGS="%optflags -I/usr/X11/include"
    105 export RPM_OPT_FLAGS="$CFLAGS"
    106 export LDFLAGS="%_ldflags"
    107 export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
    108 
    109 %ifarch amd64 sparcv9
    110 %at_spi_64.build -d %name-%version/%_arch64
    111 %endif
    112 
    113 %at_spi.build -d %name-%version/%base_arch
    114 %libgail_gnome.build -d %name-%version/%base_arch
    115 %if %option_with_java
    116 %java_access_bridge.build -d %name-%version/%base_arch
    117 %endif
    118 %freetts.build -d %name-%version/%base_arch
    119 %gnome_mag.build -d %name-%version/%base_arch
    120 
    121 %install
    122 %ifarch amd64 sparcv9
    123 %at_spi_64.install -d %name-%version/%_arch64
    124 %endif
    125 
    126 %at_spi.install -d %name-%version/%base_arch
    127 %libgail_gnome.install -d %name-%version/%base_arch
    128 %if %option_with_java
    129 %java_access_bridge.install -d %name-%version/%base_arch
    130 
    131 # Determine the full path (symlinks resolved) to JDK pointed to by /usr/java.
    132 BASEDIR=%{_basedir}
    133 cd $BASEDIR
    134 JAVADIR=java
    135 JDK_DIR=$BASEDIR
    136 # If $JAVADIR is a symlink then we must resolve it.
    137 if [ -d $JAVADIR -a -h $JAVADIR ]
    138 then
    139   # Get symlink target.
    140   DIR=`ls -l $JAVADIR | awk '{print $NF}'`
    141   echo "DIR=$DIR"
    142 
    143   # If the target is a symlink then need to resolve it.
    144   if [ -d $DIR -a -h $DIR ]
    145   then
    146     nextdir=`dirname $DIR`
    147     cd $nextdir
    148     JDK_DIR="$JDK_DIR/$nextdir"	 # Append this bit.
    149 
    150 	f=`basename $DIR`
    151     nextdir=`ls -l $f | awk '{print $NF}'`
    152     JDK_DIR="$JDK_DIR/$nextdir"
    153   else
    154   # otherwise just append to $JDK_DIR and we're done.
    155     JDK_DIR="$JDK_DIR/$DIR"
    156   fi
    157 else
    158   # If the 'java' item is not a symlink (presumably a dir) there will be no
    159   # symlink to installf items to.
    160   exit 2
    161 fi
    162 
    163 # Determine the full path (symlinks resolved) to JDK pointed to by /usr/java.
    164 
    165 mkdir -p ${RPM_BUILD_ROOT}/${JDK_DIR}/jre/lib/ext
    166 
    167 cd ${RPM_BUILD_ROOT}/${JDK_DIR}/jre/lib || exit 2
    168 mv ${RPM_BUILD_ROOT}/usr/lib/libjava-access-bridge-jni.so.0.0.0 ./ext/libjava-access-bridge-jni.so
    169 rm ${RPM_BUILD_ROOT}/usr/lib/libjava-access-bridge-jni.*
    170 
    171 # Dynamically determine number of '..' required.
    172 JAR_DIR=share/jar
    173 DOTS=.
    174 LEVEL=0
    175 FILE=accessibility.properties
    176 # Keep testing, up to a max of 10 levels to avoid infinite loop.
    177 while [ ! -f $DOTS/$JAR_DIR/$FILE ] && [ $LEVEL -lt 10 ]
    178 do
    179   DOTS="$DOTS/.."
    180   LEVEL=`expr $LEVEL + 1`
    181 done
    182 if [ -f $DOTS/$JAR_DIR/$FILE ]; then
    183   rm -f ${RPM_BUILD_ROOT}/${JDK_DIR}/jre/lib/$FILE
    184   ln -s $DOTS/$JAR_DIR/$FILE ${RPM_BUILD_ROOT}/${JDK_DIR}/jre/lib/$FILE || exit 2
    185 fi
    186 FILE=gnome-java-bridge.jar
    187 if [ -f $DOTS/$JAR_DIR/$FILE ]; then
    188   rm -f ${RPM_BUILD_ROOT}/${JDK_DIR}/jre/lib/ext/$FILE
    189   cp ${RPM_BUILD_ROOT}/usr/share/jar/$FILE ${RPM_BUILD_ROOT}/${JDK_DIR}/jre/lib/ext/$FILE || exit 2
    190 
    191 fi
    192 
    193 cd %{_builddir}
    194 
    195 %endif
    196 %freetts.install -d %name-%version/%base_arch
    197 %gnome_mag.install -d %name-%version/%base_arch
    198 rm -rf $RPM_BUILD_ROOT%{_mandir}
    199 cd %{_builddir}/%name-%version/sun-manpages
    200 make install DESTDIR=$RPM_BUILD_ROOT
    201 
    202 # Remove .la files.
    203 rm -f $RPM_BUILD_ROOT%{_libdir}/orbit-2.0/GNOME_Magnifier_module.la
    204 # Remove .pyo files
    205 find $RPM_BUILD_ROOT -name '*.pyo' -exec rm {} \;
    206 
    207 # Remove empty dir
    208 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/gnome-mag-*/reference/html
    209 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/gnome-mag-*/reference
    210 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/gnome-mag-*
    211 
    212 %if %build_l10n
    213 %else
    214 # REMOVE l10n FILES
    215 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
    216 %endif
    217 
    218 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
    219 
    220 %clean
    221 rm -rf $RPM_BUILD_ROOT
    222 
    223 %files
    224 %defattr (-, root, bin)
    225 %ifarch amd64 sparcv9
    226 %dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
    227 %{_libdir}/%{_arch64}/lib*.so*
    228 %{_libdir}/%{_arch64}/bonobo
    229 %{_libdir}/%{_arch64}/gtk-2.0/modules/*.so
    230 %{_libexecdir}/%{_arch64}/at-spi-registryd
    231 %{_libdir}/%{_arch64}/orbit-2.0/*.so
    232 %endif
    233 
    234 %dir %attr (0755, root, bin) %{_bindir}
    235 %{_bindir}/*
    236 %dir %attr (0755, root, bin) %{_libdir}
    237 %{_libdir}/lib*.so*
    238 %{_libdir}/bonobo
    239 %{_libdir}/gtk-2.0/modules/*.so
    240 %{_libdir}/orbit-2.0/*.so
    241 %{_libdir}/python?.?
    242 %{_libexecdir}/at-spi-registryd
    243 %dir %attr (0755, root, sys) %{_datadir}
    244 %dir %attr (0755, root, sys) %{_datadir}/lib
    245 %doc -d %{base_arch} at-spi-%{at_spi.version}/README 
    246 %doc -d %{base_arch} at-spi-%{at_spi.version}/AUTHORS
    247 %doc(bzip2) -d %{base_arch} at-spi-%{at_spi.version}/COPYING 
    248 %doc(bzip2) -d %{base_arch} at-spi-%{at_spi.version}/NEWS 
    249 %doc(bzip2) -d %{base_arch} at-spi-%{at_spi.version}/ChangeLog
    250 %doc -d %{base_arch} freetts/freetts-%{freetts.version}/license.terms 
    251 %doc -d %{base_arch} freetts/freetts-%{freetts.version}/acknowledgments.txt 
    252 %doc -d %{base_arch} freetts/freetts-%{freetts.version}/ANNOUNCE.txt 
    253 %doc -d %{base_arch} freetts/freetts-%{freetts.version}/RELEASE_NOTES 
    254 %doc -d %{base_arch} freetts/freetts-%{freetts.version}/README.txt
    255 %doc -d %{base_arch} gnome-mag-%{gnome_mag.version}/README 
    256 %doc -d %{base_arch} gnome-mag-%{gnome_mag.version}/AUTHORS 
    257 %doc -d %{base_arch} gnome-mag-%{gnome_mag.version}/colorblind/colorblind-applet.py
    258 %doc(bzip2) -d %{base_arch} gnome-mag-%{gnome_mag.version}/COPYING 
    259 %doc(bzip2) -d %{base_arch} gnome-mag-%{gnome_mag.version}/NEWS 
    260 %doc(bzip2) -d %{base_arch} gnome-mag-%{gnome_mag.version}/ChangeLog
    261 %doc -d %{base_arch} java-access-bridge-%{java_access_bridge.version}/README 
    262 %doc -d %{base_arch} java-access-bridge-%{java_access_bridge.version}/AUTHORS
    263 %doc(bzip2) -d %{base_arch} java-access-bridge-%{java_access_bridge.version}/COPYING 
    264 %doc(bzip2) -d %{base_arch} java-access-bridge-%{java_access_bridge.version}/NEWS 
    265 %doc(bzip2) -d %{base_arch} java-access-bridge-%{java_access_bridge.version}/ChangeLog
    266 %doc -d %{base_arch} libgail-gnome-%{libgail_gnome.version}/README 
    267 %doc -d %{base_arch} libgail-gnome-%{libgail_gnome.version}/AUTHORS
    268 %doc(bzip2) -d %{base_arch} libgail-gnome-%{libgail_gnome.version}/COPYING 
    269 %doc(bzip2) -d %{base_arch} libgail-gnome-%{libgail_gnome.version}/NEWS 
    270 %doc(bzip2) -d %{base_arch} libgail-gnome-%{libgail_gnome.version}/ChangeLog
    271 %dir %attr (0755, root, other) %{_datadir}/doc
    272 %{_datadir}/doc/at-spi-%{at_spi.version}/*
    273 %{_datadir}/gnome-mag
    274 %if %option_with_java
    275 %{_datadir}/jar
    276 %{_basedir}/jdk/instances/*/jre/lib/accessibility.properties
    277 %{_basedir}/jdk/instances/*/jre/lib/ext/gnome-java-bridge.jar
    278 %{_basedir}/jdk/instances/*/jre/lib/ext/*.so
    279 %endif
    280 %{_datadir}/lib/freetts
    281 
    282 %files devel
    283 %ifarch amd64 sparcv9
    284 %defattr (-, root, bin)
    285 %dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
    286 %{_libdir}/%{_arch64}/pkgconfig/*
    287 %endif
    288 %defattr (-, root, bin)
    289 %dir %attr (0755, root, bin) %{_libdir}
    290 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
    291 %{_libdir}/pkgconfig/*
    292 %dir %attr (0755, root, bin) %{_includedir}
    293 %{_includedir}/*
    294 %dir %attr (0755, root, sys) %{_datadir}
    295 %{_datadir}/idl
    296 %{_datadir}/gtk-doc
    297 %dir %attr(0755, root, bin) %{_mandir}
    298 %dir %attr(0755, root, bin) %{_mandir}/*
    299 %{_mandir}/*/*
    300 
    301 %files root
    302 %defattr (-, root, sys)
    303 %attr (0755, root, sys) %dir %{_sysconfdir}
    304 %{_sysconfdir}/gconf/schemas/at-spi.schemas
    305 
    306 %if %build_l10n
    307 %files l10n
    308 %defattr (-, root, bin)
    309 %dir %attr (0755, root, sys) %{_datadir}
    310 %attr (-, root, other) %{_datadir}/locale
    311 %endif
    312 
    313 %changelog
    314 * Wed Jan 20 2009 - jeff.cai@sun.com
    315 - Ship a JNI library for java-access-bridge
    316 * Fri Oct 16 2008 - jeff.cai@sun.com
    317 - Create symbol links for accessibility.properties and gnome-java-bridge.jar
    318   as parts of the package.
    319   In the previous versions,  the symbol links are created in post scripts which
    320   will not be executed in OpenSolaris.
    321   Fix d.o.o bug #5253
    322 - Change rmdir to rm -rf since the doc pathes of gnome-mag are not
    323   empty after the integration of SUNWdoxygen.
    324   We still don't ship references of gnome-mag for now.
    325 * Mon Sep 29 2008 - christian.kelly (at] sun.com
    326 - Added -root pkg for /etc/gconf/schemas/at-spi-schmeas.
    327 * Mon Sep 22 2008 - dave.lin (at] sun.com
    328 - Removed the empty dir /usr/share/doc/gnome-mag*
    329 * Thu Sep 18 2008 - li.yuan (at] sun.com
    330 - Added %doc to %files for copyright.
    331 * Wed Sep 03 2008 - dave.lin (at] sun.com
    332 - Add %defattr (-, root, bin) for "/usr/lib/amd/pkgconfig" dir, otherwise
    333   the pc files have "gbuild" ownership
    334 * Tue Aug 05 2008 - li-yan.zhang (at] sun.com
    335 - Add manpages.
    336 * Wed Jul 09 2008 - damien.carbery (at] sun.com
    337 - Remove EXTRA_LDFLAGS after adding patch to at-spi.
    338 * Wed Jul 09 2008 - li.yuan (at] sun.com
    339 - Put %defattr prior to new files.
    340 * Wed Jul 09 2008 - li.yuan (at] sun.com
    341 - Move login-helper to EXTRA_LDFLAGS and add arch infomation so libraries depend
    342   on it can find it in the right place. Also add 
    343   %{_libdir}/%{_arch64}/bonobo/servers/*.server to the file section.
    344 * Tue Jul 08 2008 - damien.carbery (at] sun.com
    345 - Set ACLOCAL_FLAGS for use in gnome-mag.spec.
    346 * Mon Jul 07 2008 - li.yuan (at] sun.com
    347 - Fix 6697334. Add 64 bit libraries support for at-spi.
    348 * Mon Mar 31 2008 - li.yuan (at] sun.com
    349 - Add copyright file
    350 * Wed Mar 19 2008 - dermot.mccluskey (at] sun.com
    351 - Add dep on SUNWj6rt so that gnome-java-bridge.jar and accessibility.properties
    352   get installed in correct /usr/java link location. Fixes 6641866.
    353 * Thu Jan 10 2008 - li.yuan (at] sun.com
    354 - change owner to liyuan.
    355 * Sun Oct  7 2007 - laca (at] sun.com
    356 - add /usr/X11/include to CFLAGS
    357 - delete Nevada X deps
    358 * Fri Sep 28 2007 - laca (at] sun.com
    359 - disable java access bridge if build without java support
    360 * Wed Sep 05 2007 - damien.carbery (at] sun.com
    361 - Remove references to SUNWgnome-a11y-base-libs as its contents have been
    362   moved to SUNWgnome-base-libs.
    363 * Thu Jun 07 2007 - damien.carbery (at] sun.com
    364 - Add %{_libdir}/python?.? to %files and remove .pyo files in %install.
    365 * Tue Mar 13 2007 - damien.carbery (at] sun.com
    366 - Incorporate %post changes from Mary Ding. Fixes 6531193.
    367 * Mon Mar 05 2007 - damien.carbery (at] sun.com
    368 - Add Build/Requires SUNWgnome-config/-devel as gconf-2.0.pc is needed.
    369 * Fri Sep 01 2006 - Matt.Keenan (at] sun.com
    370 - New Manpage tarball
    371 * Sat Aug 12 2006 - laca (at] sun.com
    372 - delete some unnecessary env variables
    373 * Fri Jul 14 2006 - damien.carbery (at] sun.com
    374 - Remove .la files before packaging.
    375 * Thu Jun 22 2006 - damien.carbery (at] sun.com
    376 - Change 'return 0' to 'exit 0' in main function in %post share. Fixes 6437617.
    377 * Tue Jun 13 2006 - damien.carbery (at] sun.com
    378 - Add dependencies on SUNWzoner/u and SUNWpkgcmdsu for zonename and pkgcond
    379   binaries that are used in the postinstall script. As suggested in 6377106.
    380 * Sun Jun 11 2006 - laca (at] sun.com
    381 - change group from other to bin/sys
    382 * Tue May 30 2006 - damien.carbery (at] sun.com
    383 - Merge postinstall script from JDS3.1 branch. Include fix for 6431039.
    384 * Tue May 09 2006 - laca (at] sun.com
    385 - merge -share pkg(s) into the base pkg(s)
    386 * Fri May 05 2006 - damien.carbery (at] sun.com
    387 - Copy postinstall script from JDS3.1 branch. Incorporate dynamic code.
    388 * Tue Mar 14 2006 - damien.carbery (at] sun.com
    389 - Add doc dir to share package.
    390 * Mon Feb 20 2006 - damien.carbery (at] sun.com
    391 - Complete update of Build/Requires after running check-deps.pl script.
    392 * Thu Feb 16 2006 - damien.carbery (at] sun.com
    393 - Update Build/Requires after running check-deps.pl script.
    394 - Move Requires SUNWj5rt to share package as postinstall that installs the 
    395   symlink under a SUNWj5rt directory is in share package. Make base package
    396   require share package.
    397 * Fri Dec 02 2005 - damien.carbery (at] sun.com
    398 - Add Requires SUNWj5rt so that symlink can be created.
    399 * Mon Nov 21 2005 - damien.carbery (at] sun.com
    400 - Add %post share code to accomodate zones. Bug 6347858. Copied from 
    401   cinnabar-solaris branch.
    402 * Mon Sep 12 2005 - laca (at] sun.com
    403 - define l10n subpkg
    404 * Tue Jun 14 2005 - brian.cameron (at] sun.com
    405 - Fix packaging.
    406 * Fri Jun 10 2005 - damien.carbery (at] sun.com
    407 - Call %freetts.build, and add lib/freetts dir to share package.
    408 * Mon Nov 22 2004 - damien.carbery (at] sun.com
    409 - Fix for 6197816: gnopernicus moved to /usr/demo/jds so gnome-mag moved to
    410   SUNWgnome-a11y-libs package to remain in /usr/bin.
    411 * Sat Oct 02 2004 - laca (at] sun.com
    412 - added %pkgbuild_postprocess
    413 * Mon Aug 30 2004 - shirley.woo (at] sun.com
    414 - Bug 5091588 : sman3/4  files should be in a devel package
    415 * Mon Aug 23 2004 - laca (at] sun.com
    416 - s/SUNWpl5u/SUNWperl584usr/
    417 * Wed Aug 18 2004 - brian.cameron (at] sun.com
    418 - Added back gtk-docs to packaging.  Needed because the at-cspi docs
    419   are referred to from the libcspi.3 man page.
    420 * Wed Aug 18 2004 - damien.carbery (at] sun.com
    421 - Change manpage perms for Solaris integration.
    422 * Fri Jul 23 2004 - damien.carbery (at] sun.com
    423 - Move freetts from SUNWgnome-a11y-speech.
    424 * Tue Jun 22 2004 - shirley.woo (at] sun.com
    425 - changed install location to /usr/lib and /usr/bin
    426 * Wed Apr 14 2004 - padraig.obriain (at] sun.com
    427 - Add entry to %files for accessibility.properties and gnome-java-bridge.jar
    428 * Fri Mar 26 2004 - laca (at] sun.com
    429 - add panel dependency
    430 * Wed Mar 24 2004 - brian.cameron (at] sun.com
    431 - Added SGML man page integration
    432 * Tue Mar 23 2004 - laca (at] sun.com
    433 - Remove gtk-doc and _datadir/lib from %files
    434 * Thu Feb 26 2004 - laca (at] sun.com
    435 - Add devel-share subpkg for idl files and api docs
    436