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