Home | History | Annotate | Download | only in trunk
      1 #
      2 # spec file for package SUNWgnome-display-mgr
      3 #
      4 # includes module(s): gdm
      5 #
      6 # Copyright 2008 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: yippi
     11 #
     12 %include Solaris.inc
     13 
     14 %use gdm = gdm.spec
     15 
     16 Name:                    SUNWgnome-display-mgr
     17 Summary:                 GNOME display manager
     18 Version:                 %{default_pkg_version}
     19 Source:                  %{name}-manpages-0.1.tar.gz
     20 Source1:                 gdm.xml
     21 SUNW_BaseDir:            %{_basedir}
     22 SUNW_Copyright:          %{name}.copyright
     23 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     24 
     25 %include default-depend.inc
     26 BuildRequires: SUNWlibrsvg-devel
     27 BuildRequires: SUNWgnome-base-libs-devel
     28 BuildRequires: SUNWgnome-libs-devel
     29 BuildRequires: SUNWlxml
     30 BuildRequires: SUNWlibcroco
     31 BuildRequires: SUNWlibpopt-devel
     32 BuildRequires: SUNWlibrsvg-devel
     33 %if %option_without_fox
     34 #
     35 # GDM's configure depends on Xephyr to be installed so it properly
     36 # sets Xnest configure option.
     37 BuildRequires: SUNWxorg-server
     38 Requires: SUNWxorg-server
     39 Requires: SUNWxwplt
     40 %else
     41 # if SUNWxwplt is installed, then configure finds /usr/X11/bin/Xserver
     42 # instead of /usr/X11/bin/Xorg
     43 BuildConflicts: SUNWxwplt
     44 %endif
     45 Requires: SUNWlibms
     46 Requires: SUNWlibpopt
     47 Requires: SUNWgnome-base-libs
     48 Requires: SUNWgnome-libs
     49 Requires: SUNWgnome-display-mgr-root
     50 Requires: SUNWgnome-dialog
     51 Requires: SUNWlibrsvg
     52 Requires: SUNWlxml
     53 Requires: SUNWlibcroco
     54 Requires: SUNWpostrun
     55 %if %option_with_dt
     56 Requires: SUNWgnome-dtlogin-integration
     57 %else
     58 Requires: SUNWgnome-dtstart
     59 %endif
     60 
     61 %package root
     62 Summary:                 %{summary} - / filesystem
     63 SUNW_BaseDir:            /
     64 %include default-depend.inc
     65 
     66 %if %build_l10n
     67 %package l10n
     68 Summary:                 %{summary} - l10n files
     69 SUNW_BaseDir:            %{_basedir}
     70 %include default-depend.inc
     71 Requires:                %{name}
     72 %endif
     73 
     74 %prep
     75 rm -rf %name-%version
     76 mkdir %name-%version
     77 %gdm.prep -d %name-%version
     78 chmod -R u+w %{_builddir}/%name-%version/gdm-%{gdm.version}
     79 cd %{_builddir}/%name-%version
     80 gzcat %SOURCE0 | tar xf -
     81 
     82 %build
     83 export LDFLAGS="%_ldflags -L/usr/openwin/lib -lXau -R/usr/openwin/lib -R/usr/sfw/lib"
     84 export PKG_CONFIG_PATH=%{_pkg_config_path}
     85 X11_CFLAGS=
     86 pkg-config --exists x11 && X11_CFLAGS=`pkg-config --cflags x11`
     87 export CFLAGS="%optflags $X11_CFLAGS"
     88 export RPM_OPT_FLAGS="$CFLAGS"
     89 %if %option_without_dt
     90 export GDMGNOMESESSIONCMD="/usr/bin/dtstart jds"
     91 %endif
     92 %gdm.build -d %name-%version
     93 
     94 %install
     95 rm -rf $RPM_BUILD_ROOT
     96 %gdm.install -d %name-%version
     97 
     98 rm -rf $RPM_BUILD_ROOT%{_mandir}
     99 cd %{_builddir}/%name-%version/sun-manpages
    100 make install DESTDIR=$RPM_BUILD_ROOT
    101 
    102 install -d $RPM_BUILD_ROOT/var/svc/manifest/application/graphical-login
    103 install --mode=0444 %SOURCE1 $RPM_BUILD_ROOT/var/svc/manifest/application/graphical-login
    104 
    105 rmdir $RPM_BUILD_ROOT/etc/X11/dm
    106 rmdir $RPM_BUILD_ROOT/etc/pam.d
    107 
    108 # The %{_datadir}/xsessions file contains two files: a gnome.desktop file
    109 # and a CDE.desktop file.  We always want to delete the gnome.desktop
    110 # file since it is now delivered by the gnome-session module.  If not
    111 # shipping with CDE support, then remove the entire xsessions directory.
    112 #
    113 %if %option_with_dt
    114 rm $RPM_BUILD_ROOT%{_datadir}/xsessions/gnome.desktop
    115 %else
    116 rm -fR $RPM_BUILD_ROOT%{_datadir}/xsessions
    117 %endif
    118 
    119 %if %build_l10n
    120 %else
    121 # REMOVE l10n FILES
    122 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
    123 rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/*help/*/[a-z]*
    124 rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/gdm/*-[a-z]*.omf
    125 %endif
    126 
    127 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
    128 
    129 %clean
    130 rm -rf $RPM_BUILD_ROOT
    131 
    132 %post
    133 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
    134   echo '/usr/bin/update-desktop-database'
    135 ) | $BASEDIR/lib/postrun -b -u -c JDS_wait
    136 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
    137   echo '/usr/bin/scrollkeeper-update'
    138 ) | $BASEDIR/lib/postrun -b -u -c JDS
    139 
    140 %post root
    141 cat >> $BASEDIR/var/svc/profile/upgrade <<\EOF
    142 
    143 # We changed gdm's FMRI.  If the old service exists and is enabled,
    144 # disable it and enable the new one.
    145 gdm=svc:/application/gdm2-login:default
    146 if svcprop -q $gdm; then
    147 	set -- `svcprop -C -t -p general/enabled $gdm`
    148 	if [ $? -ne 0 ]; then
    149 		echo "Could not read whether $gdm was enabled."
    150 	elif [ $2 != boolean ]; then
    151 		echo "general/enabled property of $gdm has bad type."
    152 	elif [ $# -ne 3 ]; then
    153 		echo "general/enabled property of $gdm has the wrong number\c"
    154 		echo " of values."
    155 	elif [ $3 = true ]; then
    156 		svcadm disable $gdm
    157 		svcadm enable svc:/application/graphical-login/gdm:default
    158 	fi
    159 fi
    160 
    161 EOF
    162 
    163 %postun
    164 test -x $BASEDIR/lib/postrun || exit 0
    165 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
    166   echo '/usr/bin/update-desktop-database'
    167 ) | $BASEDIR/lib/postrun -b -u -c JDS
    168 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
    169   echo '/usr/bin/scrollkeeper-update'
    170 ) | $BASEDIR/lib/postrun -b -u -c JDS
    171 
    172 %files
    173 %defattr (-, root, bin)
    174 %dir %attr (0755, root, bin) %{_bindir}
    175 %{_bindir}/*
    176 %dir %attr (0755, root, bin) %{_sbindir}
    177 %{_sbindir}/gdm
    178 %{_sbindir}/gdm-binary
    179 %{_sbindir}/gdm-restart
    180 %{_sbindir}/gdm-safe-restart
    181 %{_sbindir}/gdm-stop
    182 %attr (0700, root, bin) %{_sbindir}/gdmsetup
    183 %dir %attr (0755, root, bin) %{_libdir}
    184 %{_libdir}/gtk-2.0/modules/*.so
    185 %{_libexecdir}/gdm*
    186 %dir %attr (0755, root, sys) %{_datadir}
    187 %{_datadir}/gdm
    188 %dir %attr (0755, root, other) %{_datadir}/gnome
    189 %{_datadir}/gnome/help/gdm/C
    190 %attr (-, root, other) %{_datadir}/icons
    191 %{_datadir}/omf/gdm/*-C.omf
    192 %dir %attr (0755, root, other) %{_datadir}/pixmaps
    193 %{_datadir}/pixmaps/*
    194 # Include CDE desktop file if building with CDE.
    195 %if %option_with_dt
    196 %{_datadir}/xsessions
    197 %endif
    198 %dir %attr(0755, root, bin) %{_mandir}
    199 %dir %attr(0755, root, bin) %{_mandir}/man1
    200 %dir %attr(0755, root, bin) %{_mandir}/man1m
    201 %{_mandir}/man1/*
    202 %{_mandir}/man1m/*
    203 
    204 %files root
    205 %defattr (-, root, sys)
    206 %attr (0755, root, sys) %dir %{_sysconfdir}
    207 %if %is_s10
    208 %dir %attr (0755, root, other) %{_sysconfdir}/X11
    209 %else
    210 %dir %{_sysconfdir}/X11
    211 %endif
    212 %dir %{_sysconfdir}/X11/gdm
    213 %{_sysconfdir}/X11/gdm/Init
    214 %{_sysconfdir}/X11/gdm/Post*
    215 %{_sysconfdir}/X11/gdm/Pre*
    216 %{_sysconfdir}/X11/gdm/X*
    217 %{_sysconfdir}/X11/gdm/gdmprefetchlist
    218 %config %class(preserve) %{_sysconfdir}/X11/gdm/custom.conf
    219 %{_sysconfdir}/X11/gdm/locale.alias
    220 %{_sysconfdir}/X11/gdm/modules
    221 # don't use %_localstatedir here, because this is an absolute path
    222 # defined by another package, so it has to be /var/svc even if this
    223 # package's %_localstatedir is redefined
    224 %dir %attr (0755, root, sys) /var
    225 /var/svc/*
    226 %dir %attr (0755, root, sys) /var/log
    227 %dir %attr (0755, root, root) /var/log/gdm
    228 %dir %attr (0755, root, other) %{_localstatedir}/lib
    229 %dir %attr (1770, root, gdm) %{_localstatedir}/lib/gdm
    230 
    231 %if %build_l10n
    232 %files l10n
    233 %defattr (-, root, bin)
    234 %dir %attr (0755, root, sys) %{_datadir}
    235 %dir %attr (0755, root, other) %{_datadir}/gnome
    236 %attr (-, root, other) %{_datadir}/locale
    237 %{_datadir}/gnome/*help/*/[a-z]*
    238 %{_datadir}/omf/gdm/*-[a-z]*.omf
    239 %endif
    240 
    241 %changelog
    242 * Tue Jun 24 2008 - damien.carbery@sun.com
    243 - Remove "-lgailutil" from LDFLAGS. Root cause found in gtk+: bugzilla 536430.
    244 * Thu Jun 05 2008 - damien.carbery@sun.com
    245 - Add "-lgailutil" to LDFLAGS so that libgailutil is linked in when
    246   libgnomecanvas is linked. libgnomecanvas.so includes some gail functions.
    247 * Wed May 07 2008 - damien.carbery@sun.com
    248 - Remove PERL5LIB setting as it is not necessary.
    249 * Thu May 01 2008 - brian.cameron@sun.com
    250 - Fix packaging.  Ship the CDE desktop file if building with
    251   "with_dt".
    252 * Thu Mar 27 2008 - brian.cameron@sun.com
    253 - Add SUNW_Copyright.
    254 * Sat Jan 26 2008 - brian.cameron@sun.com
    255 - Minor cleanup
    256 * Thu Jan 17 2008 - damien.carbery@sun.com
    257 - Delete %{_datadir}/xsessions/gnome.desktop file as it is now delivered by
    258   gnome-session module.
    259 * Fri Oct 12 1007 - laca@sun.com
    260 - add x11 compile flags to CFLAGS if x11.pc exists (FOX fix)
    261 * Fri Sep 28 2007 - laca@sun.com
    262 - add support for building with FOX and using dtstart instead of
    263   dtlogin-integration
    264 * Fri May 11 2007 - brian.cameron@sun.com
    265 - Fix packaging and add needed -R/usr/sfw/lib to link flags.
    266 * Thu May 10 2007 - brian.cameron@sun.com
    267 - Fix packaging for bumping to 2.19.0.
    268 * Thu Apr 12 2007 - brian.cameron@sun.com
    269 - Add SUNWxorg-server as a dependency, since GDM depends on Xephyr
    270 * Fri Mar 09 2007 - brian.cameron@sun.com
    271 - Change file permissions for gdmsetup to 700 so that the gdmsetup
    272   menu choice only appears for the root user.  Also no longer install
    273   the %{datadir}/applications directory since we now install to 
    274   /usr/share/gdm/applications.
    275 * Sun Jan 28 2007 - laca@sun.com
    276 - update %files root so that dir attributes work on both s10 and nevada
    277 * Fri Sep 01 2006 - Matt.Keenan@sun.com
    278 - New Manpage tarball
    279 * Mon Aug 28 2006 - brian.cameron@sun.com
    280 - Add gdmdynamic manpage.
    281 * Fri Aug 25 2006 - laca@sun.com
    282 - move the smf profile rename postinstall stuff into the -root subpkg,
    283   because the base package doesn't have access to the / files in the
    284   case of a diskless installation, part of CR6448317
    285 * Wed Aug 23 2006 - brian.cameron (at] sun.com
    286 - Move some GDM manpages to sman1m to reflect that the binaries have
    287   moved to /usr/sbin.
    288 * Sat Aug 12 2006 - laca (at] sun.com
    289 - change datadir/icons permissions back to root:other since it's a stable
    290   interface and wasn't supposed to be changed
    291 * Fri Jul 14 2006 - laca (at] sun.com
    292 - update %post/%postun/etc scripts to support diskless client setup,
    293   part of 6448317
    294 * Thu Jun 29 2006 - laca (at] sun.com
    295 - update postrun scripts
    296 * Fri Jun 23 2006 - christopher.hanna (at] sun.com
    297 - Removed manpages which arent needed: gdmchooser, gdmgreeter and gdmlogin
    298 * Sun Jun 11 2006 - laca (at] sun.com
    299 - change group from other to bin/sys
    300 * Fri May 12 2006 - brian.cameorn (at] sun.com
    301 - Add SUNWgnome-dialog as a dependency since GDM does use zenity in places.
    302 * Thu May 11 2006 - brian.cameron (at] sun.com
    303 - Added %post scripting to migrate users from the old SMF service name
    304   to the new one.  
    305 * Wed May 10 2006 - laca (at] sun.com
    306 - merge -share pkg(s) into the base pkg(s)
    307 * Tue May 09 2006 - brian.cameron (at] sun.com
    308 - No longer install the /var/gdm directories here since they get installed via
    309   make install.
    310 * Tue Apr 18 2006 - brian.cameron (at] sun.com
    311 - Mark custom.conf as in the preserve class so it doesn't get deleted on pkgrm.
    312 * Mon Feb 20 2006 - damien.carbery@sun.com
    313 - Update Build/Requires after running check-deps.pl script.
    314 * Fri Feb 17 2006 - damien.carbery@sun.com
    315 - Mark custom.conf as volatile (%config).
    316 * Thu Feb 16 2006 - damien.carbery@sun.com
    317 - Update Build/Requires after running check-deps.pl script.
    318 * Tue Feb 14 2006 - damien.carbery@sun.com
    319 - Update %files for new tarball (conf files renamed).
    320 * Sat Jan 21 2006 - damien.carbery@sun.com
    321 - Remove locale.alias.orig file from %files. Mistake in build.
    322 * Thu Jan 19 2006 - brian.cameron@sun.com
    323 - Fixed packaging after updating to 2.13.0.6
    324 * Thu Jan 19 2006 - damien.carbery@sun.com
    325 - Add new %files from bumped tarball.
    326 * Tue Jan 17 2006 - damien.carbery@sun.com
    327 - Add SUNWlibcroco to Build/Requires list.
    328 * Mon Jan 16 2006 - damien.carbery@sun.com
    329 - Move /usr/sfw/include reference from gdm.spec to here as it is Solaris only.
    330 - Update Build/Requires lines.
    331 * Mon Jan 16 2006 - padraig.obriain@sun.com
    332 - add reference to %{_libexecdir}/X11/gdm/gdmprefetchlist
    333 * Sat Dec  3 2005 - laca@sun.com
    334 - add %post script that runs update-desktop-database
    335 * Tue Nov 29 2005 - laca@sun.com
    336 - remove javahelp stuff
    337 * Thu Sep 15 2005 - laca@sun.com
    338 - Remove unpackaged empty directories
    339 * Thu Jul 28 2005 - damien.carbery@suncom
    340 - Add SUNWlibrsvg-devel build dependency. Add SUNWlibrsvg runtime dependency.
    341 - Wed Jul 13 2005 - brian.cameron@sun.com
    342 - Updated to 2.8.0.5.  Updated SVC (GreenLine) integration.
    343 + Mon Feb 07 2004 - brian.cameron@sun.com
    344 - Fixed permissions on /var/lib/gdm so it doesn't complain on
    345   reinstall.  The gdm binary program changes the ownership and
    346   permissions of this file on runtime if they aren't set 
    347   properly.  This change makes the original permissions set
    348   by the package correct so gdm won't change them.
    349 * Thu Nov 18 2004 - hidetoshi.tajima (at] sun.com
    350 - #5081827 - required SUNWgnome-dtlogin-integration to run
    351 /usr/dt/config/Xsession.jds in gnome session
    352 * Wed Nov 17 2004 - matt.keenan (at] sun.com
    353 - #6195852 - Fix manpage directory installed (stopper)
    354 * Sat Nov 13 2004 - laca (at] sun.com
    355 - include gdm.conf in the "preserve" class, fixes 5101934
    356   Note: requires pkgbuild-0.8.2 (CBE 0.18)
    357 * Fri Nov 12 2004 - kazuhiko.maekawa (at] sun.com
    358 - Revised files section
    359 * Sat Oct 02 2004 - laca (at] sun.com
    360 - added %pkgbuild_postprocess
    361 * Thu Sep 02 2004  <damien.carbery (at] sun.com>
    362 - Add %dir %attr for mandir and mandir/man1. Attribute change install error.
    363 * Thu Sep 02 2004  <matt.keenan (at] sun.com>
    364 - Added gdm manpages for solaris
    365 * Tue Jul 27 2004  <glynn.foster (at] sun.com>
    366 - Put back the New Login in New Window as it's supported.
    367 * Tue Jul 27 2004  <glynn.foster@sun.com>
    368 - Remove the flexiserver .desktop items. Need to have a 
    369   look to see if the flexiserver binary stuff should be
    370   include as well or not. Part fix for #5043894.
    371 * Fri Jul 23 2004  <brian.cameron@sun.com>
    372 - Now include /var/lib/gdm and /var/lib/log/gdm in the
    373   package so that gdm can run out-of-the-box.
    374 * Sun Jun 27 2004  shirley.woo@sun.com
    375 - Changed install location to /usr/...
    376 * Wed Jun  2 2004 - takao.fujiwara@sun.com
    377 - Added %{_datadir}/locale to install l10n messages
    378 * Mon Mar 01 2004 - <laca@sun.com>
    379 - define PERL5LIB.
    380 - add share and root subpkgs
    381