SUNWxdg-user-dirs.spec
author chrisk
Thu, 18 Sep 2008 13:08:56 +0000
changeset 13665 72812532567b
parent 13641 b9fcc7267d19
child 13727 bffd35ce212a
permissions -rw-r--r--
2008-09-18 Christian Kelly <[email protected]> * SUNWxdg-user-dirs.spec: Remove /usr/share/, /usr/share/doc from -root, which I had added previously in error.

#
# spec file for package SUNWxdg-user-dirs
#
# Copyright 2008 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: dkenny
#

%include Solaris.inc

Name:                SUNWxdg-user-dirs
Summary:             Tool to help manage user directories
Version:             0.10
Source:              http://user-dirs.freedesktop.org/releases/xdg-user-dirs-%{version}.tar.gz
Source1:           	 %{name}-manpages-0.1.tar.gz
Source2:             xdg-user-dirs-update.desktop
%if %build_l10n
Source3:                 l10n-configure.sh
%endif
# date:2008-02-15 owner:dkenny type:bug
Patch0:              xdg-user-dirs-01-bugs.diff
# date:2008-02-20 owner:fujiwara type:feature
Patch2:              xdg-user-dirs-02-enable-nls.diff
SUNW_BaseDir:        %{_basedir}
SUNW_Copyright:      %{name}.copyright
BuildRoot:           %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
Requires: %name-root
Requires: SUNWgnome-base-libs
Requires: SUNWbash
BuildRequires: SUNWgnome-base-libs-devel

%if %build_l10n
%package l10n
Summary:             %{summary} - l10n files
SUNW_BaseDir:        %{_basedir}
%include default-depend.inc
Requires:            %{name}
%endif

%package root
Summary:             %{summary} - / filesystem
SUNW_BaseDir:        /
%include default-depend.inc


%prep
%setup -c -q -n %{name}-%{version}
cd xdg-user-dirs-%{version}
%patch0 -p1
%patch2 -p1

sed -e "s/TEMPLATES=Templates/TEMPLATES=Documents\/Templates/" \
	-e "s/MUSIC=Music/MUSIC=Documents\/Music/" \
	-e "s/PICTURES=Pictures/PICTURES=Documents\/Pictures/" \
	-e "s/VIDEOS=Videos/VIDEOS=Documents\/Videos/" user-dirs.defaults > user-dirs.defaults.$$
mv user-dirs.defaults.$$ user-dirs.defaults

sed -e "s/^filename_encoding=UTF-8/filename_encoding=locale/" \
  user-dirs.conf > user-dirs.conf.$$
mv user-dirs.conf.$$ user-dirs.conf
cd ..

#unzip the manpage tarball
cd %{_builddir}/%{name}-%{version}
gzcat %SOURCE1 | tar xf -

%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
     CPUS=1
fi

cd xdg-user-dirs-%{version}
export LDFLAGS="%_ldflags -lglib-2.0"
export CFLAGS="%optflags"
intltoolize -c -f --automake

%if %build_l10n
bash -x %SOURCE3 --enable-copyright
%endif

aclocal
autoconf
automake -a -c -f
./configure --prefix=%{_prefix}  \
            --bindir=%{_bindir} \
            --sysconfdir=/etc

make -j$CPUS
cd ..

%install
rm -rf $RPM_BUILD_ROOT
cd xdg-user-dirs-%{version}
make install DESTDIR=$RPM_BUILD_ROOT
cd ..

#Install manpages
rm -rf $RPM_BUILD_ROOT%{_mandir}
cd %{_builddir}/%name-%version/sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/etc/xdg/autostart
cp %SOURCE2 $RPM_BUILD_ROOT/etc/xdg/autostart

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
%endif

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr (-, root, bin)
%{_bindir}
%dir %attr(0755, root, bin) %{_mandir}
%{_mandir}/*/*
%doc -d xdg-user-dirs-%{version} AUTHORS README NEWS
%doc(bzip2) -d xdg-user-dirs-%{version} COPYING ChangeLog po/ChangeLog
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/doc

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr(0755, root, other) %{_datadir}/locale
%dir %attr(0755, root, other) %{_datadir}/locale/*
%dir %attr(0755, root, other) %{_datadir}/locale/*/*
%dir %attr(0755, root, other) %{_datadir}/locale/*/*/*
%endif

%files root
%defattr (-, root, sys)
%dir %attr (0755, root, sys) %{_sysconfdir}
%{_sysconfdir}/*


%changelog
* Thu Sep 18 2008 - [email protected]
- Remove /usr/share/, /usr/share/doc from -root, which I had added previously in 
  error.
* Fri Sep 15 2008 - [email protected]
- Remove /usr/share/doc from %files.
* Fri Sep 12 2008 - [email protected]
- Update copyright
* Thu Sep 11 2008 - [email protected]
- Fix typo.
* Fri Aug 22 2008 - [email protected]
- Remove option_with_indiana_branding.
* Tue Aug 12 2008 - [email protected]
- Update user-dirs.defaults according to UI spec of OpenSolaris 2008.11.
* Wed May 21 2008 - [email protected]
- Add Requires: SUNWbash to fix 6697951.
* Fri Apr 11 2008 - [email protected]
- Restore desktop file, needs to be run on login after all to fix bug#6682501
* Fri Apr 04 2008 - [email protected]
- Add manpages
* Fri Feb 29 2008 - [email protected]
- set filename_encoding=locale
* Mon Feb 25 2008 - [email protected]
- Remove autostart file since the autoastart functionality is now provied by
  xdg-user-dirs-gtk
* Fri Feb 22 2008 - [email protected]
- Moved from spec-files-other/core
* Wed Feb 20 2008 - [email protected]
- Add l10n package
* Tue Feb 19 2008 - [email protected]
- Bump to 0.10
* Fri Feb 15 2008 - [email protected]
- added patch comment
- prepend %_ldflags to $LDFLAGS
- set CFLAGS
* Tue Feb 12 2008 - [email protected]
- Updated to create a root pkg and fix a bug in creating of directories.
  Renamed patch to reflect this change.
- Created an autostart desktop file to ensure it's run on startup of desktop.
* Tue Feb 12 2008 - [email protected]
- initial version