File eIDconfig-belgium.spec of Package eIDconfig-belgium

#
# spec file for package eIDconfig-belgium (Version 1.1.3)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           eIDconfig-belgium
BuildRequires:  docbook_4 glade-sharp2 glib-sharp2 gnome-doc-utils-devel gtk-sharp2 mono-devel ndesk-dbus-devel ndesk-dbus-glib-devel perl-XML-Parser pkgconfig scrollkeeper
Requires:       mono >= 1.1.16, mono(gtk-sharp) >= 2.8.0.0, mono(glade-sharp) >= 2.8.0.0, ndesk-dbus >= 0.6.0, ndesk-dbus-glib >= 0.3, hal >= 0.5.6, pcsc-lite >= 1.2.9, mozilla-nss-tools >= 3.11, expect >= 5.43, eID-belgium >= 2.5.9, eID-belgium-patchcollection-1
Provides:       locale(MozillaFirefox:de_BE;en_BE;fr_BE;nl_BE;wa_BE)
License:        GPL v2 or later
Group:          System/Libraries
Version:        1.1.3
Release:        4
Summary:        Configuration toolkit for the Belgian eID middleware
Url:            http://developer.novell.com/wiki/index.php/eID-belgium
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         eidconfig-belgium-1.1.3.tar.bz2
Patch0:         eidconfig-belgium-omf.patch

%description
eIDconfig-belgium aims at easing the configuration of both the Belgian
eID middleware and applications that can use this middleware to
interact with the Belgian eID card.



%prep
%setup -n eidconfig-belgium-%{version}
%patch0

%build
export CFLAGS="$RPM_OPT_FLAGS"
./configure --prefix=/usr --libdir=%{_libdir} --disable-scrollkeeper
make

%install
%makeinstall

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_bindir}/eidconfig-belgium
%dir %{_libdir}/eidconfig-belgium
%{_libdir}/eidconfig-belgium/eIDconfig-belgium.exe
%{_libdir}/eidconfig-belgium/CheckDbus.exe
%{_libdir}/eidconfig-belgium/eIDconfig-belgium.sh
%{_libdir}/eidconfig-belgium/changepin.exp
%{_libdir}/eidconfig-belgium/Hal.dll
%{_datadir}/locale/de/LC_MESSAGES/eidconfig-belgium.mo
%{_datadir}/locale/fr/LC_MESSAGES/eidconfig-belgium.mo
%{_datadir}/locale/nl/LC_MESSAGES/eidconfig-belgium.mo
%{_datadir}/applications/eIDconfig-belgium.desktop
%{_datadir}/pixmaps/eIDconfig-belgium.png
%dir %{_datadir}/gnome/help/eIDconfig-belgium
%{_datadir}/gnome/help/eIDconfig-belgium/*
%dir %{_datadir}/omf/eIDconfig-belgium
%{_datadir}/omf/eIDconfig-belgium/*
%doc AUTHORS
%doc ChangeLog
%doc COPYING
%doc NEWS
%doc README

%post
EIDCONFFILE="/etc/eID-belgium/beidgui.conf"
EIDCONFFILETMP="/etc/eID-belgium/beidgui.conf.tmp"
if [ -f "$EIDCONFFILE" ] ; then
	if ((grep '[Application_Filtering]' "$EIDCONFFILE" 2>/dev/null 1>&2)
	&& (! grep 'eidconfig-belgium=*' "$EIDCONFFILE" 2>/dev/null 1>&2)); then
		if sed -e "s/\[Application_Filtering\]/\[Application_Filtering\]\neidconfig-belgium=\*/" < "$EIDCONFFILE" > "$EIDCONFFILETMP" ; then
			mv "$EIDCONFFILETMP" "$EIDCONFFILE"
		fi
	fi
fi

%postun
EIDCONFFILE="/etc/eID-belgium/beidgui.conf"
EIDCONFFILETMP="/etc/eID-belgium/beidgui.conf.tmp"
if [ $1 = 0 ] ; then
	if [ -f "$EIDCONFFILE" ] ; then
		if ((grep '[Application_Filtering]' "$EIDCONFFILE" 2>/dev/null 1>&2)
		&& (grep 'eidconfig-belgium=*' "$EIDCONFFILE" 2>/dev/null 1>&2)); then
			if sed -e "/eidconfig-belgium=\*/d" < "$EIDCONFFILE" > "$EIDCONFFILETMP" ; then
				mv "$EIDCONFFILETMP" "$EIDCONFFILE"
			fi
		fi
	fi
fi

%changelog
openSUSE Build Service is sponsored by