Skip to content

Commit

Permalink
Package SSSDConfig API
Browse files Browse the repository at this point in the history
  • Loading branch information
sgallagher committed Oct 13, 2009
1 parent d80577e commit 1031525
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
9 changes: 9 additions & 0 deletions contrib/sssd.spec.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Expand Down Expand Up @@ -89,6 +90,8 @@ make install DESTDIR=$RPM_BUILD_ROOT
# Copy default sssd.conf file
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sssd
install -m600 server/examples/sssd.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.conf
install -m400 server/config/etc/sssd.api.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.api.conf
install -m400 server/config/etc/sssd.api.d/* $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.api.d/

# Remove .la files created by libtool
rm -f \
Expand Down Expand Up @@ -131,6 +134,9 @@ rm -rf $RPM_BUILD_ROOT
%attr(750,root,root) %dir %{_var}/log/%{name}
%dir %{_sysconfdir}/sssd
%config(noreplace) %{_sysconfdir}/sssd/sssd.conf
%config %{_sysconfdir}/sssd/sssd.api.conf
%attr(700,root,root) %dir %{_sysconfdir}/sssd/sssd.api.d
%config %{_sysconfdir}/sssd/sssd.api.d/
%{_mandir}/man5/sssd.conf.5*
%{_mandir}/man5/sssd-krb5.5*
%{_mandir}/man5/sssd-ldap.5*
Expand All @@ -145,6 +151,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/locale/*/LC_MESSAGES/sss_client.mo
%{_datadir}/locale/*/LC_MESSAGES/sss_daemon.mo
%{python_sitearch}/pysss.so
%{python_sitelib}/*.py*
%{?fedora:%{python_sitelib}/*.egg-info}


%files client
/%{_lib}/libnss_sss.so.2
Expand Down
21 changes: 21 additions & 0 deletions server/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if BUILD_KRB5_LOCATOR_PLUGIN
krb5plugindir = @krb5pluginpath@
endif
sssdconfdir = $(sysconfdir)/sssd
sssdapiplugindir = $(sssdconfdir)/sssd.api.d
dbusintrospectdir = $(datarootdir)/sssd/introspect
dbuspolicydir = $(sysconfdir)/dbus-1/system.d
localedir = @localedir@
Expand Down Expand Up @@ -100,6 +101,10 @@ pyexec_LTLIBRARIES = \
pysss.la
endif

dist_noinst_SCRIPTS = \
config/setup.py \
config/SSSDConfig.py

###############################
# Global compilation settings #
###############################
Expand Down Expand Up @@ -537,6 +542,14 @@ SUFFIXES = .1.xml .1 .3.xml .3 .5.xml .5 .8.xml .8
dist_init_SCRIPTS = \
sysv/sssd

dist_sssdconf_DATA = \
config/etc/sssd.api.conf
dist_sssdapiplugin_DATA = \
config/etc/sssd.api.d/sssd-krb5.conf \
config/etc/sssd.api.d/sssd-ldap.conf \
config/etc/sssd.api.d/sssd-local.conf \
config/etc/sssd.api.d/sssd-proxy.conf

installsssddirs::
mkdir -p \
$(DESTDIR)$(includedir) \
Expand All @@ -558,6 +571,14 @@ installsssddirs::
$(DESTDIR)$(logpath)

install-exec-hook: installsssddirs
if [ "$(DESTDIR)" = "" ]; then \
cd $(srcdir)/config; $(PYTHON) setup.py install; \
else \
cd $(srcdir)/config; $(PYTHON) setup.py install --root=$(DESTDIR); \
fi

clean-local:
cd $(srcdir)/config; $(PYTHON) setup.py clean --all

CLEANFILES = *.X */*.X */*/*.X

Expand Down
34 changes: 34 additions & 0 deletions server/config/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Authors:
# Stephen Gallagher <sgallagh@redhat.com>
#
# Copyright (C) 2009 Red Hat
# see file 'COPYING' for use and warranty information
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; version 2 only
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

"""
Python-level packaging using distutils.
"""

from distutils.core import setup

setup(
name='SSSDConfig',
version='1',
license='GPLv3+',
url='http://fedorahosted.org/sssd',
py_modules=[
'SSSDConfig',
],
)

0 comments on commit 1031525

Please sign in to comment.