[mate-conf] update the spec file

Dan Mashal vicodan at fedoraproject.org
Thu Sep 6 22:43:50 UTC 2012


commit f72a642ef831ee09d8fe4e9ed21f889af27e57f0
Author: Dan Mashal <dan.mashal at fedoraproject.org>
Date:   Thu Sep 6 15:43:29 2012 -0700

    update the spec file

 mate-conf.spec |  195 ++++++++++++++++++++++++-------------------------------
 1 files changed, 85 insertions(+), 110 deletions(-)
---
diff --git a/mate-conf.spec b/mate-conf.spec
index 543dfaa..b4f2534 100644
--- a/mate-conf.spec
+++ b/mate-conf.spec
@@ -1,162 +1,137 @@
-%global mate_corba_version 1.1.0
-%global glib2_version 2.14.0
-%global dbus_version 1.0.0
-%global dbus_glib_version 0.74
-
-Summary:	A process-transparent configuration system
-Name:		mate-conf
+Name:	mate-conf
 Version:	1.4.0
-Release:	16%{?dist}
+Release:	17%{?dist}
+Summary:	MATE Desktop configuration files
+
 License:	LGPLv2+ and GPLv2+
 URL:		http://mate-desktop.org
 Source0:	http://pub.mate-desktop.org/releases/1.4/%{name}-%{version}.tar.xz
 
-# Copy schemas from old package for later uninstall on upgrade.
-# Macro to remove schemas.  Not meant to be used publically.
-# Remove schemas unconditionally.
-# Remove schemas on package removal (not upgrade).
-Source1:	macros.mateconf
-
-BuildRequires: dbus-glib-devel
-BuildRequires: gettext
-BuildRequires: glib2-devel
-BuildRequires: gobject-introspection-devel 
-BuildRequires: gtk2-devel
-BuildRequires: gtk-doc 
-BuildRequires: intltool
-BuildRequires: libxml2-devel
-BuildRequires: libxslt-devel
-BuildRequires: mate-common
-BuildRequires: mate-corba-devel
-BuildRequires: openldap-devel
-BuildRequires: polkit-devel
-BuildRequires: gtk+-devel
-
-# for patch0
-Requires: /usr/bin/killall
-
-Patch0: %{name}-1.4.0-reload.patch
-# http://bugzilla.gnome.org/show_bug.cgi?id=568845
+BuildRequires:	desktop-file-utils mate-corba mate-corba-devel mate-common mate-polkit mate-polkit-devel gtk-doc glib2-devel gettext intltool gobject-introspection-devel libxml2-devel gtk2-devel dbus-glib-devel chrpath gobject-introspection-devel polkit-devel
+Requires:	gnome-doc-utils
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+Obsoletes: mate-conf < 1.4.0-16
 
 %description
-mate-conf is a process-transparent configuration database API used to
-store user preferences. It has plug gable back ends and features to
-support work group administration.
+Configuration database system for MATE Desktop
 
 %package devel
-Summary: Headers and libraries for mate-conf development
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Summary: Development libraries for mate-conf
+Requires:	%{name}%{?_isa} = %{version}-%{release}
 
 %description devel
-mate-conf development package. Contains files needed for doing
-development using mate-conf.
+Lbraries and header development files for mate-conf.
 
 %prep
-%setup -q -n mate-conf-%{version}
-%patch0 -p1 -b .reload
+%setup -q
 NOCONFIGURE=1 ./autogen.sh
 
 %build
-%configure \
-	--disable-static \
-	--with-openldap \
-	--enable-defaults-service \
-	--enable-gtk \
-	--enable-gsettings-backend=yes \
-	--enable-introspection \
-	--enable-gtk-doc
-
-# drop unneeded direct library deps with --as-needed
-# libtool doesn't make this easy, so we do it the hard way
-sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/	if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/	func_append compile_command " -Wl,-O1,--as-needed"\n	func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool
+%configure --disable-static --enable-gtk --enable-gtk-doc-html --enable-introspection --enable-gsettings-backend --enable-defaults-service --with-gtk=2.0
+make %{?_smp_mflags} V=1
 
-make %{?_smp_mflags}
-
-%install
-make install DESTDIR=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
 
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/mateconf/schemas
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/mateconf/mateconf.xml.system
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/rpm-state/mateconf
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/MateConf/matesettings
+%post
+/sbin/ldconfig
+/usr/bin/gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules || :
+/usr/bin/update-desktop-database &> /dev/null || :
+if [ $1 -eq 1 ] ; then 
+    # Initial installation
+    /bin/systemctl enable org.mate.MateConf.Defaults.service >/dev/null 2>&1 || :
+fi
 
-install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
+if [ $1 -eq 1 ] ; then 
+    # Initial installation 
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
 
-%find_lang %{name}
 
+%preun
+/sbin/ldconfig
+if [ $1 -eq 0 ] ; then
+    # Package removal, not upgrade
+    /bin/systemctl --no-reload disable org.mate.MateConf.Defaults.service > /dev/null 2>&1 || :
+    /bin/systemctl stop org.mate.MateConf.Defaults.service  > /dev/null 2>&1 || :
+fi
 
-%post
+%postun
 /sbin/ldconfig
-ln -s 
-if [ $1 -gt 1 ]; then
-    if ! grep -f mateconf.xml.system %{_sysconfdir}/mateconf/2/path; then
-		sed -i -e 's at xml:readwrite:$(HOME)/.mateconf@&\n\n# Location for system-wide settings.\nxml:readonly:/etc/mateconf/mateconf.xml.system@' %{_sysconfdir}/mateconf/2/path
-    fi
+/usr/bin/gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules &> /dev/null || :
+/usr/bin/update-desktop-database &> /dev/null || :
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    /bin/systemctl try-restart org.mate.MateConf.Defaults.service >/dev/null 2>&1 || :
 fi
 
-%postun -p /sbin/ldconfig
+%install
+make install DESTDIR=%{buildroot}
+%find_lang %{name} --all-name
+
+find %{buildroot} -name '*.la' -exec rm -rf {} ';'
+find %{buildroot} -name '*.a' -exec rm -rf {} ';'
+
+desktop-file-install									\
+	--dir=%{buildroot}%{_sysconfdir}/xdg/autostart					\
+%{buildroot}%{_sysconfdir}/xdg/autostart/mateconf-gsettings-data-convert.desktop
+
+%check
+desktop-file-validate %{buildroot}/%{_sysconfdir}/xdg/autostart/mateconf-gsettings-data-convert.desktop
 
 %files -f %{name}.lang
-%doc COPYING NEWS README backends/README.evoldap
-%config(noreplace) %{_sysconfdir}/mateconf/2/path
-%config(noreplace) %{_sysconfdir}/mateconf/2/evoldap.conf
-%dir %{_sysconfdir}/mateconf
-%dir %{_sysconfdir}/mateconf/2
-%dir %{_sysconfdir}/mateconf/mateconf.xml.defaults
-%dir %{_sysconfdir}/mateconf/mateconf.xml.mandatory
-%dir %{_sysconfdir}/mateconf/mateconf.xml.system
-%dir %{_sysconfdir}/mateconf/schemas
+%doc AUTHORS README COPYING
+%{_bindir}/mateconf-gsettings-data-convert
+%{_bindir}/mateconf-gsettings-schema-convert
 %{_bindir}/mateconf-merge-tree
 %{_bindir}/mateconftool-2
+%{_datadir}/gtk-doc/html/mateconf
+%{_datadir}/aclocal/mateconf-2.m4
+%{_datadir}/dbus-1/services/org.mate.MateConf.service
+%{_datadir}/sgml/mateconf/mateconf-1.0.dtd
+%{_datadir}/man/man1/*
+%{_libexecdir}/mateconf-sanity-check-2
 %{_libexecdir}/mateconfd-2
-%{_libdir}/libmateconf-2.so.4*
-%{_libdir}/MateConf/2/*.so
-%dir %{_datadir}/sgml
-%{_datadir}/sgml/mateconf/
-%{_datadir}/MateConf/
-%{_mandir}/man1/*
-%dir %{_libdir}/MateConf
-%dir %{_libdir}/MateConf/2
-%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.mate.MateConf.Defaults.conf
+%config(noreplace) %{_sysconfdir}/mateconf/2/path
+%{_libdir}/libmateconf-2.so.4.1.5
+%{_libdir}/libmateconf-2.so.4
+%{_sysconfdir}/dbus-1/system.d/org.mate.MateConf.Defaults.conf
 %{_libexecdir}/mateconf-defaults-mechanism
-%{_datadir}/polkit-1/actions/org.mate.mateconf.defaults.policy
+%{_sysconfdir}/xdg/autostart/mateconf-gsettings-data-convert.desktop
 %{_datadir}/dbus-1/system-services/org.mate.MateConf.Defaults.service
-%{_datadir}/dbus-1/services/org.mate.MateConf.service
-%{_localstatedir}/lib/rpm-state/mateconf/
-%{_libdir}/girepository-1.0
-%config(noreplace) %{_sysconfdir}/rpm/macros.mateconf
-%config(noreplace) %{_sysconfdir}/xdg/autostart/mateconf-gsettings-data-convert.desktop
-%{_bindir}/mateconf-gsettings-data-convert
-%{_bindir}/mateconf-gsettings-schema-convert
-%{_libdir}/gio/modules/libgsettingsmateconfbackend.so
-%{_libexecdir}/mateconf-sanity-check-2
+%{_datadir}/polkit-1/actions/org.mate.mateconf.defaults.policy
+
 
 %files devel
 %{_libdir}/libmateconf-2.so
-%{_includedir}/mateconf/
-%{_datadir}/aclocal/mateconf-2.m4
-%{_datadir}/gtk-doc/html/mateconf
 %{_libdir}/pkgconfig/mateconf-2.0.pc
-%{_datadir}/gir-1.0/
+%{_includedir}/mateconf/2/mateconf
+%{_datadir}/gir-1.0/MateConf-2.0.gir
+%{_libdir}/gio/modules/libgsettingsmateconfbackend.so
+%{_libdir}/girepository-1.0/MateConf-2.0.typelib
+%{_libdir}/MateConf/2/libmateconfbackend-oldxml.so
+%{_libdir}/MateConf/2/libmateconfbackend-xml.so
 
 %changelog
-* Sun Sep 2 2012 Dan Mashal <dan.mashal at fedoraproject.org> 1.4.0-16
-- Drop the useless gtk package, and specific version requirements for buildrequires field. 
+* Thu Sep 06 2012 Dan Mashal <dan.mashal at fedoraproject.org> 1.4.0-17
+- Rebuild entire spec from scratch
+
+* Sun Sep 02 2012 Dan Mashal <dan.mashal at fedoraproject.org> 1.4.0-16
+- Drop the useless gtk package, and specific version requirements for buildrequires field.
 - Move mateconf-sanity-check-2 to the main package where it's needed
 
 * Sun Aug 26 2012 Dan Mashal <dan.mashal at fedoraproject.org 1.4.0-15
 - Bump release for repush
 
 * Mon Aug 06 2012 Rex Dieter <rdieter at fedoraproject.org> 1.4.0-14
-- tighten subpkgs deps (%{__isa})
+- tighten subpkgs deps (isa)
 - -devel: drop needless pkgconfig-related deps (they're autodetected)
 - sort BR's
 - omit needless Conflicts: mate-conf-dbus
 - don't own /var/lib/rpm-state
 - drop Group: tags
-- %files: track abi/abi items closer
+- files: track abi/abi items closer
 
 * Tue Jul 31 2012 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.4.0-11
 - remove %%defattr(-, root, root)


More information about the scm-commits mailing list