Home | History | Annotate | Download | only in trunk
      1 #
      2 # spec file for package SUNWgnome-camera
      3 #
      4 # includes module(s): libgphoto2, gphoto2, gtkam
      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 %define owner wangke
     11 #
     12 %include Solaris.inc
     13 %use libgphoto2 = libgphoto2.spec
     14 %use gphoto2 = gphoto2.spec
     15 %use gtkam = gtkam.spec
     16 
     17 Name:                    SUNWgnome-camera
     18 Summary:                 GNOME digital camera tool
     19 Version:                 %{default_pkg_version}
     20 Source:                  %{name}-manpages-0.1.tar.gz
     21 SUNW_BaseDir:            %{_basedir}
     22 SUNW_Copyright:          %{name}.copyright
     23 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     24 
     25 %include default-depend.inc
     26 Requires: SUNWgtk2
     27 Requires: SUNWgnome-libs
     28 Requires: SUNWlibusb
     29 Requires: SUNWgnome-component
     30 Requires: SUNWgnome-img-editor
     31 Requires: SUNWjpg
     32 Requires: SUNWlibexif
     33 Requires: SUNWlibms
     34 Requires: SUNWlibpopt
     35 Requires: SUNWmlib
     36 Requires: SUNWdesktop-cache
     37 Requires: SUNWdbus
     38 Requires: SUNWdsdu
     39 Requires: SUNWltdl
     40 Requires: SUNWslang
     41 Requires: SUNWaalib
     42 BuildRequires: SUNWgtk2-devel
     43 BuildRequires: SUNWgnome-component-devel
     44 BuildRequires: SUNWlibexif-devel
     45 BuildRequires: SUNWlibpopt-devel
     46 # gtkam builds a gimp plug-in, so SUNWgnome-img-editor is a dependancy
     47 BuildRequires: SUNWgnome-img-editor-devel
     48 BuildRequires: SUNWgnu-gettext
     49 BuildRequires: SUNWlibusb
     50 BuildRequires: SUNWdbus-devel
     51 BuildRequires: SUNWdsdu
     52 BuildRequires: SUNWlibtool
     53 BuildRequires: SUNWltdl
     54 
     55 %if %build_l10n
     56 %package l10n
     57 Summary:                 %{summary} - l10n files
     58 SUNW_BaseDir:            %{_basedir}
     59 %include default-depend.inc
     60 Requires:                %{name}
     61 %endif
     62 
     63 %package devel
     64 Summary:                 %{summary} - development files
     65 SUNW_BaseDir:            %{_basedir}
     66 %include default-depend.inc
     67 
     68 %prep
     69 rm -rf %name-%version
     70 mkdir %name-%version
     71 %libgphoto2.prep -d %name-%version
     72 %gphoto2.prep -d %name-%version
     73 %gtkam.prep -d %name-%version
     74 cd %{_builddir}/%name-%version
     75 gzcat %SOURCE0 | tar xf -
     76 
     77 %build
     78 # note: This ACLOCAL_FLAGS setting seems unnecessary, but it's
     79 # needed so that gettext.m4 is used from /usr/share/aclocal and
     80 # not from ./m4m
     81 export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
     82 export CFLAGS="%optflags"
     83 export RPM_OPT_FLAGS="$CFLAGS"
     84 export LDFLAGS="%_ldflags -R/usr/sfw/lib"
     85 
     86 %libgphoto2.build -d %name-%version
     87 
     88 export PKG_CONFIG_PATH=%{_builddir}/%name-%version/libgphoto2-%{libgphoto2.version}:%{_builddir}/%name-%version/libgphoto2-%{libgphoto2.version}/libgphoto2_port:%{_pkg_config_path}
     89 
     90 %gphoto2.build -d %name-%version
     91 
     92 %gtkam.build -d %name-%version
     93 
     94 %install
     95 rm -rf $RPM_BUILD_ROOT
     96 %libgphoto2.install -d %name-%version
     97 %gphoto2.install -d %name-%version
     98 %gtkam.install -d %name-%version
     99 
    100 cd %{_builddir}/%name-%version/sun-manpages
    101 make install DESTDIR=$RPM_BUILD_ROOT
    102 
    103 rm -rf $RPM_BUILD_ROOT%{_prefix}/var
    104 # Remove source code files (AUTHORS, README, CHANGELOG etc)
    105 rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
    106 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/gtkam
    107 # Remove Linux specific hotplug stuff
    108 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}
    109 
    110 %if %build_l10n
    111 %else
    112 # REMOVE l10n FILES
    113 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
    114 rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/[a-z]*
    115 rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z].omf
    116 %endif
    117 
    118 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):unsupported" $RPM_BUILD_ROOT}
    119 
    120 %clean
    121 rm -rf $RPM_BUILD_ROOT
    122 
    123 %post
    124 %restart_fmri desktop-mime-cache
    125 
    126 %postun
    127 %restart_fmri desktop-mime-cache
    128 
    129 %files
    130 %defattr (-, root, bin)
    131 %dir %attr (0755, root, bin) %{_bindir}
    132 %{_bindir}/gphoto2
    133 %{_bindir}/gtkam
    134 %{_bindir}/gexif
    135 %dir %attr (0755, root, bin) %{_libdir}
    136 %{_libdir}/lib*.so*
    137 %{_libdir}/libgphoto2
    138 %{_libdir}/libgphoto2_port
    139 %{_libdir}/gimp
    140 %dir %attr (0755, root, sys) %{_datadir}
    141 %dir %attr (0755, root, other) %{_datadir}/applications
    142 %{_datadir}/applications/*
    143 %doc libgphoto2-%{libgphoto2.version}/AUTHORS
    144 %doc(bzip2) libgphoto2-%{libgphoto2.version}/COPYING
    145 %doc(bzip2) libgphoto2-%{libgphoto2.version}/ChangeLog
    146 %doc(bzip2) libgphoto2-%{libgphoto2.version}/NEWS
    147 %doc(bzip2) libgphoto2-%{libgphoto2.version}/README.in
    148 %doc libgphoto2-%{libgphoto2.version}/libgphoto2_port/AUTHORS
    149 %doc libgphoto2-%{libgphoto2.version}/libgphoto2_port/NEWS
    150 %doc libgphoto2-%{libgphoto2.version}/libgphoto2_port/README
    151 %doc(bzip2) libgphoto2-%{libgphoto2.version}/libgphoto2_port/COPYING.LIB
    152 %doc(bzip2) libgphoto2-%{libgphoto2.version}/libgphoto2_port/ChangeLog
    153 %doc gphoto2-%{gphoto2.version}/NEWS
    154 %doc(bzip2) gphoto2-%{gphoto2.version}/COPYING
    155 %doc(bzip2) gphoto2-%{gphoto2.version}/ChangeLog
    156 %doc(bzip2) gphoto2-%{gphoto2.version}/README
    157 %doc gtkam-%{gtkam.version}/AUTHORS
    158 %doc gtkam-%{gtkam.version}/CHANGES
    159 %doc gtkam-%{gtkam.version}/NEWS
    160 %doc gtkam-%{gtkam.version}/README
    161 %doc(bzip2) gtkam-%{gtkam.version}/COPYING
    162 %doc(bzip2) gtkam-%{gtkam.version}/ChangeLog
    163 %doc gtkam-%{gtkam.version}/gexif-%{gtkam.gexif_version}/AUTHORS
    164 %doc gtkam-%{gtkam.version}/gexif-%{gtkam.gexif_version}/ChangeLog
    165 %doc(bzip2) gtkam-%{gtkam.version}/gexif-%{gtkam.gexif_version}/COPYING
    166 %dir %attr (0755, root, other) %{_datadir}/doc
    167 %{_datadir}/doc/gphoto2/*
    168 %dir %attr (0755, root, other) %{_datadir}/gnome
    169 %{_datadir}/gnome/help/gtkam/C
    170 %{_datadir}/gtkam
    171 %{_datadir}/images
    172 %{_datadir}/libgphoto2
    173 %{_datadir}/omf/*/*-C.omf
    174 %dir %attr (0755, root, other) %{_datadir}/pixmaps
    175 %{_datadir}/pixmaps/*
    176 %dir %attr(0755, root, bin) %{_mandir}
    177 %dir %attr(0755, root, bin) %{_mandir}/man1
    178 %{_mandir}/man1/*
    179 %dir %attr(0755, root, bin) %{_mandir}/man3
    180 %{_mandir}/man3/*
    181 
    182 %if %build_l10n
    183 %files l10n
    184 %defattr (-, root, bin)
    185 %dir %attr (0755, root, sys) %{_datadir}
    186 %dir %attr (0755, root, other) %{_datadir}/gnome
    187 %attr (-, root, other) %{_datadir}/locale
    188 %{_datadir}/gnome/help/*/[a-z]*
    189 %{_datadir}/omf/*/*-[a-z]*.omf
    190 %endif
    191 
    192 %files devel
    193 %defattr (-, root, bin)
    194 %dir %attr (0755, root, bin) %{_bindir}
    195 %{_bindir}/gphoto2-port-config
    196 %{_bindir}/gphoto2-config
    197 %dir %attr (0755, root, bin) %{_includedir}
    198 %{_includedir}/*
    199 %dir %attr (0755, root, bin) %{_libdir}
    200 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
    201 %{_libdir}/pkgconfig/*
    202 
    203 %changelog
    204 * Fri Sep 25 2009 - dave.lin@sun.com
    205 - Add 'Requires: SUNWslang' since b125.
    206 * Fri Apr  3 2009 - laca@sun.com
    207 - use desktop-cache instead of postrun
    208 * Wed Sep 10 2008 - matt.keenan@sun.com
    209 - Update copyright
    210 * Fri Aug 29 2008 - takao.fujiwara@sun.com
    211 - Add SUNWgnu-gettext build require for gtkam .mo.
    212 * Tue Jun 24 2008 - damien.carbery@sun.com
    213 - Remove "-lgailutil" from LDFLAGS. Root cause found in gtk+: bugzilla 536430.
    214 * Fri Jun 06 2008 - dmaien.carbery@sun.com
    215 - Add "-lgailutil" to LDFLAGS so that libgailutil is linked in when
    216   libgnomecanvas is linked.  libgnomecanvas.so includes some gail functions.
    217 * Mon Mar 03 2007 - matt.keenan@sun.com
    218 - Remove udev files as udev not supported on solaris
    219 * Mon Dec 17 2007 - patrick.ale@gmail.com
    220 - Add Build/Requires SUNWltdl
    221 - Remove Requires: SUNWlibtool
    222 * Fri Dec  1 2007 - damien.carbery@sun.com
    223 - Add Build/Requires SUNWlibtool.
    224 * Wed Oct 10 2007 - damien.carbery@sun.com
    225 - Update Build/Requires after running check-deps.pl script.
    226 * Thu Oct  4 2007 - laca@sun.com
    227 - define ACLOCAL_FLAGS
    228 * Mon Aug 13 2007 - brian.cameron@sun.com
    229 - Clean up.
    230 * Tue Feb 13 2007 - brian.cameron@sun.com
    231 - Add lib/udev to packaging - new directory in 2.3.1.
    232 * Fri Feb 09 2007 - brian.cameron@sun.com
    233 - Add SUNWdbus dependency since libgphoto2 requires D-Bus.
    234 * Tue Dec 19 2006 - brian.cameron@sun.com
    235 - Rework spec file after updating gtkam, libgphoto2, gphoto2 spec files.
    236 * Sat Aug 12 2006 - laca@sun.com
    237 - delete some unnecessary env variables
    238 * Tue Jul 25 2006 - damien.carbery@sun.com
    239 - Fix 'rm .omf' line to not delete the C locale file.
    240 * Fri Jul 14 2006 - laca@sun.com
    241 - update %post/%postun/etc scripts to support diskless client setup,
    242   part of 6448317
    243 * Thu Jun 29 2006 - laca@sun.com
    244 - update postrun scripts
    245 * Sun Jun 11 2006 - laca@sun.com
    246 - change group from other to bin/sys
    247 * Mon May 15 2006 - damien.carbery@sun.com
    248 - Correct l10n package perms.
    249 * Tue May 09 2006 - laca@sun.com
    250 - merge -share pkg(s) into the base pkg(s)
    251 * Tue Apr 4 2006 - glynn.foster@sun.com
    252 - Remove the hotplug stuff which is Linux specific. This
    253   cuts out the -root package currently.
    254 * Tue Apr 4 2006 - glynn.foster@sun.com
    255 - Move gphoto2-config into the -devel package.
    256 * Wed Mar 15 2006 - damien.carbery@sun.com
    257 - Add to Build/Requires after running check-deps.pl.
    258 * Mon Jan 09 2006 - damien.carbery@sun.com
    259 - Add SUNWlibusb dependency to get libusb-config.
    260 * Sat Dec  3 2005 - laca@sun.com
    261 - add %post script that runs update-desktop-database
    262 * Tue Nov 29 2005 - laca@sun.com
    263 - remove javahelp stuff
    264 * Fri Sep 30 2005 - damien.carbery@sun.com
    265 - Add root package for _sysconfdir files. Remove javahelp references.
    266   Delete .la files and others before packaging.
    267 * Mon Dec 13 2004 - damien.carbery@sun.com
    268 - Move to /usr/sfw to implement ARC decision.
    269 * Sun Nov 14 2004 - laca@sun.com
    270 - add /usr/demo/jds/lib to RPATH
    271 * Fri Nov 12 2004 - laca@sun.com
    272 - move to /usr/demo/jds
    273 * Mon Oct 11 2004 - brian.cameron@sun.com
    274 - Corrected packaging of gimp plugin.
    275 * Wed Oct 06 2004 - matt.keenan@sun.com
    276 - added l10n help files section
    277 * Sat Oct 02 2004 - laca@sun.com
    278 - added %pkgbuild_postprocess
    279 * Mon Sep 13 2004  vinay.mandyakoppal@wipro.com
    280 - Added code to install javahelp documents. Fixes #5096653.
    281 * Thu Sep 09 2004  kaushal.kumar@wipro.com
    282 - Moved %{_datadir}/pixmaps to '%files share' from '%files l10n'.
    283   Put %{_datadir}/omf/*/*-C.omf under '%files share'.
    284 * Sun Sep 05 2004 - laca@sun.com
    285 - removed root subpkg as it only contained 2 linux specific files (#5097102)
    286 * Tue Aug 24 2004 - brian.cameron@sun.com
    287 - Remove %{_datadir}/doc from install since these docs are not useful
    288   to install
    289 * Mon Aug 23 2004 - laca@sun.com
    290 - s/SUNWpl5u/SUNWperl584usr/
    291 * Sun Jun 27 2004  shirley.woo@sun.com
    292 - Changed install location to /usr/...
    293 * Mon Jun 07 2004 - brian.cameron@sun.com
    294 - Moved libexif to SUNWlibexif and libexif-gtk to SUNWgnome-libs since
    295   nautilus also uses these libraries if available.
    296 * Wed Jun 02 2004 - brian.cameron@sun.com
    297 - Added gtkam to package.
    298 * Wed Jun 02 2004 - takao.fujiwara@sun.com
    299 - Added %{_datadir}/locale to install l10n messages
    300 * Mon May 03 2004 - laca@sun.com
    301 - renamed to SUNWgnome-camera
    302 * Fri Mar 31 2004 - brian.cameron@sun.com
    303 - Created,
    304 
    305