From b5a9d8553bd1fa47ba354bf52b4adc03d070b1e3 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Thu, 26 Mar 2009 15:10:09 +0100 Subject: Rework the way how so version is defined Make the shared object version a bit more usable, the notation with double colons cannot be used on different places (see next patch). Also run automake && autoconf to refresh the generated stuff. Signed-off-by: Jan Safranek --- dist/Makefile.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'dist') diff --git a/dist/Makefile.in b/dist/Makefile.in index a8ec4c4..705070c 100644 --- a/dist/Makefile.in +++ b/dist/Makefile.in @@ -82,7 +82,9 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ -LIBRARY_VERSION = @LIBRARY_VERSION@ +LIBRARY_VERSION_MAJOR = @LIBRARY_VERSION_MAJOR@ +LIBRARY_VERSION_MINOR = @LIBRARY_VERSION_MINOR@ +LIBRARY_VERSION_RELEASE = @LIBRARY_VERSION_RELEASE@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ @@ -169,9 +171,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dist/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dist/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu dist/Makefile + $(AUTOMAKE) --foreign dist/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ -- cgit From cc051114d3c6ca553fe680b32c915f151c4cfed4 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Thu, 26 Mar 2009 15:10:09 +0100 Subject: Update the .spec file Update the .spec file to reflect automake and autoconf changes. Distribute the files to the right directories. Signed-off-by: Jan Safranek --- dist/libcgroup.spec.in | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'dist') diff --git a/dist/libcgroup.spec.in b/dist/libcgroup.spec.in index e3cc114..92be63f 100644 --- a/dist/libcgroup.spec.in +++ b/dist/libcgroup.spec.in @@ -1,3 +1,5 @@ +%define soversion @LIBRARY_VERSION_MAJOR@.@LIBRARY_VERSION_MINOR@.@LIBRARY_VERSION_RELEASE@ + Name: libcgroup Summary: Tools and libraries to control and monitor control groups Group: Development/Libraries @@ -40,14 +42,29 @@ make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install + +# install init scripts mkdir -p $RPM_BUILD_ROOT/%{_initrddir} cp scripts/init.d/cgconfig $RPM_BUILD_ROOT/%{_initrddir}/cgconfig cp scripts/init.d/cgred $RPM_BUILD_ROOT/%{_initrddir}/cgred + +# install config files mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig cp samples/cgred.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgred.conf cp samples/cgconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf +# sanitize pam module, we need only pam_cgroup.so in the right directory +mkdir -p $RPM_BUILD_ROOT/%{_lib}/security +mv -f $RPM_BUILD_ROOT/%{_lib}/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so +rm -f $RPM_BUILD_ROOT/%{_lib}/pam_cgroup* + +# move the devel stuff to /usr +mkdir -p $RPM_BUILD_ROOT/%{_libdir} +mv -f $RPM_BUILD_ROOT/%{_lib}/libcgroup.la $RPM_BUILD_ROOT/%{_libdir} +rm -f $RPM_BUILD_ROOT/%{_lib}/libcgroup.so +ln -sf ../../%{_lib}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so + %clean rm -rf $RPM_BUILD_ROOT @@ -71,12 +88,11 @@ fi %config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf %config(noreplace) %{_sysconfdir}/cgconfig.conf %config(noreplace) %{_sysconfdir}/cgrules.conf -/%{_lib}/libcgroup-%{version}.so /%{_lib}/libcgroup.so.* /bin/cgexec /bin/cgclassify /sbin/cgconfigparser -/bin/cgrulesengd +/sbin/cgrulesengd %attr(0644, root, root) %{_mandir}/man1/* %attr(0644, root, root) %{_mandir}/man5/* %attr(0644, root, root) %{_mandir}/man8/* @@ -89,7 +105,7 @@ fi %files devel %defattr(-,root,root,-) %{_includedir}/libcgroup.h -/%{_lib}/libcgroup.so +%{_libdir}/libcgroup.* %doc COPYING INSTALL -- cgit