AC_GNU_SOURCE
AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
+AC_ARG_ENABLE([rpath],
+ [AC_HELP_STRING([--disable-rpath], [do not set rpath in executables])],
+ [], [enable_rpath=yes])
+
+AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"])
+
AC_ARG_ENABLE([doc],
[AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
[], [enable_doc=auto])
[AC_HELP_STRING(
[--with-config-path=dir],
[lxc configuration repository path]
- )], [], [with_config_path="${localstatedir}/lib/lxc"])
+ )], [], [with_config_path=['${localstatedir}/lib/lxc']])
AC_ARG_WITH([rootfs-path],
[AC_HELP_STRING(
[--with-rootfs-path=dir],
[lxc rootfs mount point]
- )], [], [with_rootfs_path="${libdir}/lxc/rootfs"])
+ )], [], [with_rootfs_path=['${libdir}/lxc/rootfs']])
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
-AS_AC_EXPAND(LXCPATH, "${with_config_path}")
-AS_AC_EXPAND(LXCROOTFSMOUNT, "${with_rootfs_path}")
-AS_AC_EXPAND(LXCINITDIR, $libdir/lxc)
-AS_AC_EXPAND(LXCTEMPLATEDIR, $libdir/lxc/templates)
-AH_TEMPLATE([LXCPATH], [lxc configuration repository])
-AH_TEMPLATE([LXCINITDIR], [lxc-init directory location])
-AH_TEMPLATE([LXCROOTFSMOUNT], [lxc default rootfs mount point])
-AC_DEFINE_UNQUOTED(LXCPATH, "$LXCPATH")
-AC_DEFINE_UNQUOTED(LXCINITDIR, "$LXCINITDIR")
-AC_DEFINE_UNQUOTED(LXCROOTFSMOUNT, "$LXCROOTFSMOUNT")
+AC_SUBST(LXCPATH, "${with_config_path}")
+AC_SUBST(LXCROOTFSMOUNT, "${with_rootfs_path}")
+AC_SUBST(LXCINITDIR, ['${libdir}/lxc'])
+AC_SUBST(LXCTEMPLATEDIR, ['${libdir}/lxc/templates'])
AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
[],
Virtual Private Server, or to run isolated applications like bash or
sshd.
+%package libs
+Summary: runtime library files for %{name}
+Group: System Environment/Libraries
+
+%description libs
+The %{name}-libs package contains libraries for running %{name} applications.
+
%package devel
Release: 1
Summary: development library for %{name}
%setup
%build
test "%{ksrc}" != "none" && args="--with-linuxdir=%{ksrc}"
-PATH=$PATH:/usr/sbin:/sbin %configure $args
+PATH=$PATH:/usr/sbin:/sbin %configure $args --disable-rpath
make %{?_smp_mflags}
%install
%files
%defattr(-,root,root)
-%{_libdir}/*.so*
-%{_libdir}/%{name}
-%attr(4555,root,root) %{_libdir}/%{name}/lxc-init
%{_bindir}/*
%attr(4111,root,root) %{_bindir}/lxc-attach
%attr(4111,root,root) %{_bindir}/lxc-create
%attr(4111,root,root) %{_bindir}/lxc-checkpoint
%attr(4111,root,root) %{_bindir}/lxc-restart
%{_mandir}/*
-%{_datadir}/pkgconfig/*
%{_datadir}/doc/*
+%files libs
+%defattr(-,root,root)
+%{_libdir}/*.so.*
+%{_libdir}/%{name}
+%attr(4555,root,root) %{_libdir}/%{name}/lxc-init
+
%files devel
%defattr(-,root,root)
%{_includedir}/%{name}/*
-%{_libdir}/*.so.*
+%{_libdir}/*.so
+%{_datadir}/pkgconfig/*
%changelog
+* Thu Sep 8 2011 Greg Kurz <gkurz@fr.ibm.com> - Version 0.7.5.1
+- fix installed files for rpmbuild
+- introduce lxc-libs package
* Fri Jul 23 2010 Daniel Lezcano <dlezcano@fr.ibm.com> - Version 0.7.2
- set attribute for installed files
- fix libraries installation
--
* Mon Mar 24 2009 Daniel Lezcano <daniel.lezcano@free.fr> - Version 0.6.1
- Removed capability setting, let the user to do that through "lxc-setcap"
\
utmp.c utmp.h
-AM_CFLAGS=-I$(top_srcdir)/src
+AM_CFLAGS=-I$(top_srcdir)/src \
+ -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
+ -DLXCPATH=\"$(LXCPATH)\" \
+ -DLXCINITDIR=\"$(LXCINITDIR)\"
liblxc_so_CFLAGS = -fPIC -DPIC $(AM_CFLAGS)
pkglib_PROGRAMS = \
lxc-init
-AM_LDFLAGS=-Wl,-E -Wl,-rpath -Wl,$(libdir)
+AM_LDFLAGS = -Wl,-E
+if ENABLE_RPATH
+AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
+endif
LDADD=liblxc.so @CAP_LIBS@
lxc_attach_SOURCES = lxc_attach.c