File pam_x2go.spec of Package pam_x2go

#
# spec file for package pam_x2go
#
# Copyright (c) 2012 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/
#


Name:           pam_x2go
%define oops_name	libpam-x2go
Version:        0.0.1.0
Release:        0
License:        GPL-3.0
Summary:        PAM module to auth against an X2Go server using PyHoca
Group:          Productivity/Networking/Remote Desktop
Url:            http://x2go.org/

#DL-URL:	http://code.x2go.org/releases/source/pam_x2go/
#Git-Clone:	git://code.x2go.org/pam_x2go
#Git-Web:	http://code.x2go.org/gitweb?p=pam_x2go.git
Source:		http://code.x2go.org/releases/source/%name/%oops_name-%version.tar.gz
Source2:	http://code.x2go.org/releases/source/%name/%oops_name-%version.tar.gz.asc
Source3:	%name.keyring
Patch2:		0001-build-make-building-tests-optional.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:	gnome-common, pam-devel
%if 0%{?suse_version} >= 1130
BuildRequires:	pkgconfig(libssh)
%else
BuildRequires:	libssh-devel
%endif
Requires:	pyhoca-cli

%description
Auth and session PAM module that uses PyHoca to authenticate against
an X2Go server as the remote host and user. A local account is
required. Most useful with the pam-temp-account module.

%prep
%setup -qn %oops_name-%version
%patch -P 2 -p1

%build
if [ ! -e configure ]; then
	NOCONFIGURE=1 ./autogen.sh;
fi;
%configure --disable-static --disable-tests
make %{?_smp_mflags};

%install
b="%buildroot";
make install DESTDIR="$b";
if [ "%_lib" != "lib" ]; then
	mkdir -p "$b/%_lib/security";
	mv "$b/lib/security"/* "$b/%_lib/security/";
fi;
find "$b/%_lib" -type f -name "*.la" -delete;

%files
%defattr(-,root,root)
/%_lib/security
%_libexecdir/x2go-auth-check

%changelog
openSUSE Build Service is sponsored by