mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add a separate client-only target
This commit is contained in:
committed by
Jason Gerard DeRose
parent
383492866e
commit
a3a0c0ae33
33
Makefile
33
Makefile
@@ -2,6 +2,7 @@ include VERSION
|
||||
|
||||
SUBDIRS=daemons install ipapython ipa-client
|
||||
RADIUSDIRS=ipa-radius-server ipa-radius-admintools
|
||||
CLIENTDIRS=ipapython ipa-client
|
||||
|
||||
PRJ_PREFIX=ipa
|
||||
|
||||
@@ -42,15 +43,22 @@ all: bootstrap-autogen server
|
||||
(cd $$subdir && $(MAKE) $@) || exit 1; \
|
||||
done
|
||||
|
||||
client: client-autogen
|
||||
@for subdir in $(CLIENTDIRS); do \
|
||||
(cd $$subdir && $(MAKE) all) || exit 1; \
|
||||
done
|
||||
|
||||
radius:
|
||||
@for subdir in $(RADIUSDIRS); do \
|
||||
(cd $$subdir && $(MAKE) all) || exit 1; \
|
||||
done
|
||||
|
||||
bootstrap-autogen: version-update
|
||||
bootstrap-autogen: version-update client-autogen
|
||||
@echo "Building IPA $(IPA_VERSION)"
|
||||
cd daemons; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
|
||||
cd install; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
|
||||
|
||||
client-autogen: version-update
|
||||
cd ipa-client; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR) --with-openldap; fi
|
||||
|
||||
install: all server-install
|
||||
@@ -58,6 +66,16 @@ install: all server-install
|
||||
(cd $$subdir && $(MAKE) $@) || exit 1; \
|
||||
done
|
||||
|
||||
client-install: client
|
||||
@for subdir in $(CLIENTDIRS); do \
|
||||
(cd $$subdir && $(MAKE) install) || exit 1; \
|
||||
done
|
||||
if [ "$(DESTDIR)" = "" ]; then \
|
||||
python setup-client.py install; \
|
||||
else \
|
||||
python setup-client.py install --root $(DESTDIR); \
|
||||
fi
|
||||
|
||||
radius-install: radius install
|
||||
@for subdir in $(RADIUSDIRS); do \
|
||||
(cd $$subdir && $(MAKE) install) || exit 1; \
|
||||
@@ -90,7 +108,7 @@ server:
|
||||
python setup.py build
|
||||
|
||||
server-install: server
|
||||
if [ "$(DESTDIR)" = "" ]; then \
|
||||
if [ "$(DESTDIR)" = "" ]; then \
|
||||
python setup.py install; \
|
||||
else \
|
||||
python setup.py install --root $(DESTDIR); \
|
||||
@@ -134,6 +152,13 @@ rpms: rpmroot rpmdistdir version-update tarballs
|
||||
cp rpmbuild/SRPMS/$(PRJ_PREFIX)-$(IPA_VERSION)-*.src.rpm dist/srpms/
|
||||
rm -rf rpmbuild
|
||||
|
||||
client-rpms: rpmroot rpmdistdir version-update tarballs
|
||||
cp dist/sources/$(TARBALL) $(RPMBUILD)/SOURCES/.
|
||||
rpmbuild --define "_topdir $(RPMBUILD)" --define "ONLY_CLIENT 1" -ba ipa.spec
|
||||
cp rpmbuild/RPMS/*/$(PRJ_PREFIX)-*-$(IPA_VERSION)-*.rpm dist/rpms/
|
||||
cp rpmbuild/SRPMS/$(PRJ_PREFIX)-$(IPA_VERSION)-*.src.rpm dist/srpms/
|
||||
rm -rf rpmbuild
|
||||
|
||||
srpms: rpmroot rpmdistdir version-update tarballs
|
||||
cp dist/sources/$(TARBALL) $(RPMBUILD)/SOURCES/.
|
||||
rpmbuild --define "_topdir $(RPMBUILD)" -bs ipa.spec
|
||||
@@ -156,10 +181,14 @@ clean: version-update
|
||||
rm -f *~
|
||||
|
||||
distclean: version-update
|
||||
touch daemons/NEWS daemons/README daemons/AUTHORS daemons/ChangeLog
|
||||
touch install/NEWS install/README install/AUTHORS install/ChangeLog
|
||||
@for subdir in $(SUBDIRS); do \
|
||||
(cd $$subdir && $(MAKE) $@) || exit 1; \
|
||||
done
|
||||
rm -fr rpmbuild dist build
|
||||
rm -f daemons/NEWS daemons/README daemons/AUTHORS daemons/ChangeLog
|
||||
rm -f install/NEWS install/README install/AUTHORS install/ChangeLog
|
||||
|
||||
maintainer-clean: clean
|
||||
rm -fr rpmbuild dist build
|
||||
|
||||
41
ipa.spec.in
41
ipa.spec.in
@@ -1,10 +1,14 @@
|
||||
# Define ONLY_CLIENT to only make the ipa-client and ipa-python subpackages
|
||||
%{!?ONLY_CLIENT:%define ONLY_CLIENT 0}
|
||||
|
||||
# Define WITH_RADIUS to build the radius packages
|
||||
%define WITH_RADIUS 0
|
||||
|
||||
%define httpd_conf /etc/httpd/conf.d
|
||||
%define plugin_dir %{_libdir}/dirsrv/plugins
|
||||
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
%define POLICYCOREUTILSVER 1.33.12-1
|
||||
# Define WITH_RADIUS to build the radius packages
|
||||
%define WITH_RADIUS 0
|
||||
|
||||
Name: ipa
|
||||
Version: __VERSION__
|
||||
@@ -17,6 +21,7 @@ URL: http://www.freeipa.org/
|
||||
Source0: freeipa-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%if ! %{ONLY_CLIENT}
|
||||
BuildRequires: fedora-ds-base-devel >= 1.1.3
|
||||
BuildRequires: mozldap-devel
|
||||
BuildRequires: svrcore-devel
|
||||
@@ -38,6 +43,8 @@ BuildRequires: policycoreutils >= %{POLICYCOREUTILSVER}
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-krbV
|
||||
BuildRequires: xmlrpc-c-devel
|
||||
BuildRequires: libcurl-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
IPA is an integrated solution to provide centrally managed Identity (machine,
|
||||
@@ -45,6 +52,7 @@ user, virtual machines, groups, authentication credentials), Policy
|
||||
(configuration settings, access control information) and Audit (events,
|
||||
logs, analysis thereof).
|
||||
|
||||
%if ! %{ONLY_CLIENT}
|
||||
%package server
|
||||
Summary: The IPA authentication server
|
||||
Group: System Environment/Base
|
||||
@@ -110,6 +118,7 @@ user, virtual machines, groups, authentication credentials), Policy
|
||||
(configuration settings, access control information) and Audit (events,
|
||||
logs, analysis thereof). This package provides SELinux rules for the
|
||||
daemons included in ipa-server
|
||||
%endif
|
||||
|
||||
|
||||
%package client
|
||||
@@ -126,6 +135,8 @@ Requires: authconfig
|
||||
Requires: pam_krb5
|
||||
Requires: nss_ldap
|
||||
Requires: wget
|
||||
Requires: xmlrpc-c
|
||||
Requires: libcurl
|
||||
|
||||
%description client
|
||||
IPA is an integrated solution to provide centrally managed Identity (machine,
|
||||
@@ -135,6 +146,7 @@ logs, analysis thereof). If your network uses IPA for authentication,
|
||||
this package should be installed on every client machine.
|
||||
|
||||
|
||||
%if ! %{ONLY_CLIENT}
|
||||
%package admintools
|
||||
Summary: IPA administrative tools
|
||||
Group: System Environment/Base
|
||||
@@ -149,6 +161,7 @@ user, virtual machines, groups, authentication credentials), Policy
|
||||
(configuration settings, access control information) and Audit (events,
|
||||
logs, analysis thereof). This package provides command-line tools for
|
||||
IPA administrators.
|
||||
%endif
|
||||
|
||||
%package python
|
||||
Summary: Python libraries used by IPA
|
||||
@@ -206,23 +219,36 @@ administering radius authentication settings in IPA.
|
||||
export CFLAGS="$CFLAGS %{optflags}"
|
||||
export CPPFLAGS="$CPPFLAGS %{optflags}"
|
||||
make version-update
|
||||
%if ! %{ONLY_CLIENT}
|
||||
touch daemons/NEWS daemons/README daemons/AUTHORS daemons/ChangeLog
|
||||
touch install/NEWS install/README install/AUTHORS install/ChangeLog
|
||||
%endif
|
||||
cd ipa-client; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir} --with-openldap; cd ..
|
||||
%if ! %{ONLY_CLIENT}
|
||||
cd daemons; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
|
||||
cd install; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
|
||||
%endif
|
||||
|
||||
%if ! %{ONLY_CLIENT}
|
||||
make IPA_VERSION_IS_GIT_SNAPSHOT=no %{?_smp_mflags} version-update all
|
||||
cd selinux
|
||||
# This isn't multi-process make capable yet
|
||||
make all
|
||||
%else
|
||||
make IPA_VERSION_IS_GIT_SNAPSHOT=no %{?_smp_mflags} version-update client
|
||||
%endif
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
%if ! %{ONLY_CLIENT}
|
||||
make install DESTDIR=%{buildroot}
|
||||
cd selinux
|
||||
make install DESTDIR=%{buildroot}
|
||||
%else
|
||||
make client-install DESTDIR=%{buildroot}
|
||||
%endif
|
||||
|
||||
%if ! %{ONLY_CLIENT}
|
||||
# Remove .la files from libtool - we don't want to package
|
||||
# these files
|
||||
rm %{buildroot}/%{plugin_dir}/libipa_pwd_extop.la
|
||||
@@ -233,7 +259,6 @@ rm %{buildroot}/%{plugin_dir}/libipa_winsync.la
|
||||
# and link back.
|
||||
mkdir -p %{buildroot}/%{_sysconfdir}/ipa/html
|
||||
mkdir -p %{buildroot}/%{_localstatedir}/cache/ipa/sysrestore
|
||||
mkdir -p %{buildroot}/%{_localstatedir}/lib/ipa-client/sysrestore
|
||||
mkdir %{buildroot}%{_usr}/share/ipa/html/
|
||||
ln -s ../../../..%{_sysconfdir}/ipa/html/ssbrowser.html \
|
||||
%{buildroot}%{_usr}/share/ipa/html/ssbrowser.html
|
||||
@@ -246,10 +271,13 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
|
||||
/bin/touch $RPM_BUILD_ROOT%{_sysconfdir}/ipa/ipa.conf
|
||||
/bin/touch $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/ipa.conf
|
||||
/bin/touch $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/ipa-rewrite.conf
|
||||
%endif
|
||||
mkdir -p %{buildroot}/%{_localstatedir}/lib/ipa-client/sysrestore
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%if ! %{ONLY_CLIENT}
|
||||
%post server
|
||||
if [ $1 = 1 ]; then
|
||||
/sbin/chkconfig --add ipa_kpasswd
|
||||
@@ -322,8 +350,10 @@ if [ $? == 0 -a "${SELINUXTYPE}" == targeted -a -f ${FILE_CONTEXT}.%{name} ]; t
|
||||
rm -f ${FILE_CONTEXT}.%name
|
||||
fi
|
||||
fi
|
||||
%endif
|
||||
|
||||
|
||||
%if ! %{ONLY_CLIENT}
|
||||
%files server
|
||||
%doc LICENSE README
|
||||
%defattr(-,root,root,-)
|
||||
@@ -338,7 +368,6 @@ fi
|
||||
%attr(755,root,root) %{_initrddir}/ipa_kpasswd
|
||||
%{python_sitelib}/ipaserver/*
|
||||
%{python_sitelib}/ipawebui/*
|
||||
%{python_sitelib}/*.egg-info
|
||||
%dir %{_usr}/share/ipa
|
||||
%{_usr}/share/ipa/*.ldif
|
||||
%{_usr}/share/ipa/*.uldif
|
||||
@@ -382,6 +411,7 @@ fi
|
||||
%{_usr}/share/selinux/targeted/ipa_webgui.pp
|
||||
%{_usr}/share/selinux/targeted/ipa_kpasswd.pp
|
||||
%{_usr}/share/selinux/targeted/ipa_httpd.pp
|
||||
%endif
|
||||
|
||||
%files client
|
||||
%doc LICENSE README
|
||||
@@ -400,6 +430,7 @@ fi
|
||||
%{_mandir}/man1/ipa-client-install.1.gz
|
||||
%{_mandir}/man1/ipa-join.1.gz
|
||||
|
||||
%if ! %{ONLY_CLIENT}
|
||||
%files admintools
|
||||
%doc LICENSE README
|
||||
%defattr(-,root,root,-)
|
||||
@@ -408,6 +439,7 @@ fi
|
||||
%{_sbindir}/ipa-ldap-updater
|
||||
%{_sbindir}/ipa-compat-manage
|
||||
%{_sbindir}/ipa-nis-manage
|
||||
%endif
|
||||
|
||||
%files python
|
||||
%doc LICENSE README
|
||||
@@ -417,6 +449,7 @@ fi
|
||||
%{python_sitelib}/ipalib/*
|
||||
%if 0%{?fedora} >= 9
|
||||
%{python_sitelib}/ipapython-*.egg-info
|
||||
%{python_sitelib}/freeipa-*.egg-info
|
||||
%endif
|
||||
%config(noreplace) %{_sysconfdir}/ipa/ipa.conf
|
||||
|
||||
|
||||
38
setup-client.py
Executable file
38
setup-client.py
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Authors:
|
||||
# Jason Gerard DeRose <jderose@redhat.com>
|
||||
#
|
||||
# Copyright (C) 2008 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 for the client pieces only.
|
||||
"""
|
||||
|
||||
from setuptools import setup
|
||||
import ipalib
|
||||
|
||||
setup(
|
||||
name='freeipa',
|
||||
version=ipalib.__version__,
|
||||
license='GPLv2+',
|
||||
url='http://freeipa.org/',
|
||||
packages=[
|
||||
'ipalib',
|
||||
'ipalib.plugins',
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user