diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-08-11 12:40:14 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-08-18 12:28:18 -0400 |
commit | 45ad0c5fe1e9d3b811057d6febcb756d920fee0a (patch) | |
tree | 9fefebb0748882dbd2675e8733df9a9dd551537b /path_utils | |
parent | 169aef0315b86c1a66e6d792c2a533fafc91dd53 (diff) | |
download | ding-libs2-45ad0c5fe1e9d3b811057d6febcb756d920fee0a.tar.gz ding-libs2-45ad0c5fe1e9d3b811057d6febcb756d920fee0a.tar.xz ding-libs2-45ad0c5fe1e9d3b811057d6febcb756d920fee0a.zip |
path_utils: Add targets for RPM build
Diffstat (limited to 'path_utils')
-rw-r--r-- | path_utils/Makefile.am | 27 | ||||
-rw-r--r-- | path_utils/configure.ac | 2 | ||||
-rw-r--r-- | path_utils/contrib/libpath_utils.spec.in | 80 |
3 files changed, 107 insertions, 2 deletions
diff --git a/path_utils/Makefile.am b/path_utils/Makefile.am index 5cd797b..d83d4b7 100644 --- a/path_utils/Makefile.am +++ b/path_utils/Makefile.am @@ -14,7 +14,7 @@ dist_pkgconfig_DATA = path_utils.pc dist_include_HEADERS = path_utils.h -dist_noinst_DATA = m4 +dist_noinst_DATA = m4 contrib/libpath_utils.spec.in lib_LTLIBRARIES = libpath_utils.la libpath_utils_la_SOURCES = path_utils.c @@ -48,3 +48,28 @@ docs: @exit 1 endif +builddir ?= . +RPMBUILD ?= $(PWD)/rpmbuild + +rpmroot: + mkdir -p $(RPMBUILD)/BUILD + mkdir -p $(RPMBUILD)/RPMS + mkdir -p $(RPMBUILD)/SOURCES + mkdir -p $(RPMBUILD)/SPECS + mkdir -p $(RPMBUILD)/SRPMS + +rpms: dist-gzip rpmroot + cp $(builddir)/contrib/libpath_utils.spec $(RPMBUILD)/SPECS + cp $(distdir).tar.gz $(RPMBUILD)/SOURCES + cd $(RPMBUILD); \ + rpmbuild --define "_topdir $(RPMBUILD)" -ba SPECS/libpath_utils.spec + +# make srpms will use the old digest algorithm to be compatible +# with RHEL5 +srpm: dist-gzip rpmroot + cp $(builddir)/contrib/libpath_utils.spec $(RPMBUILD)/SPECS + cp $(distdir).tar.gz $(RPMBUILD)/SOURCES + cd $(RPMBUILD); \ + rpmbuild --define "_topdir $(RPMBUILD)" \ + --define _source_filedigest_algorithm=1 \ + -bs SPECS/libpath_utils.spec diff --git a/path_utils/configure.ac b/path_utils/configure.ac index 633882f..b9b20c6 100644 --- a/path_utils/configure.ac +++ b/path_utils/configure.ac @@ -23,5 +23,5 @@ AC_CONFIG_HEADERS([config.h]) AC_PATH_PROG([DOXYGEN], [doxygen], [false]) AM_CONDITIONAL([HAVE_DOXYGEN], [test x$DOXYGEN != xfalse ]) -AC_CONFIG_FILES([Makefile path_utils.cfg.doxy path_utils.pc]) +AC_CONFIG_FILES([Makefile path_utils.cfg.doxy path_utils.pc contrib/libpath_utils.spec]) AC_OUTPUT diff --git a/path_utils/contrib/libpath_utils.spec.in b/path_utils/contrib/libpath_utils.spec.in new file mode 100644 index 0000000..0e6d846 --- /dev/null +++ b/path_utils/contrib/libpath_utils.spec.in @@ -0,0 +1,80 @@ +Name: @PACKAGE_NAME@ +Version: @PACKAGE_VERSION@ +Release: 0%{?dist} +Summary: Filesystem Path Utilities +Group: Development/Libraries +License: LGPLv3+ +URL: http://fedorahosted.org/sssd/ +Source0: %{name}-%{version}.tar.gz +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +### Patches ### + +### Dependencies ### + +### Build Dependencies ### + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: m4 +BuildRequires: doxygen + +%description +Utility functions to manipulate filesystem pathnames + +%package devel +Summary: Development files for libpath_utils +Group: Development/Libraries +Requires: libpath_utils = %{version}-%{release} +License: LGPLv3+ + +%description devel +Utility functions to manipulate filesystem pathnames + +%prep +%setup -q + +%build +%configure \ + --disable-static \ + --disable-rpath + +make %{?_smp_mflags} all docs + +%check +make %{?_smp_mflags} check + +%install +rm -rf $RPM_BUILD_ROOT + +make install DESTDIR=$RPM_BUILD_ROOT + +# Remove .la files created by libtool +rm -f $RPM_BUILD_ROOT/%{_libdir}/libpath_utils.la + +# Remove document install script. RPM is handling this +rm -f doc/html/installdox + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc COPYING COPYING.LESSER +%{_libdir}/libpath_utils.so.1 +%{_libdir}/libpath_utils.so.1.0.0 + +%files devel +%defattr(-,root,root,-) +%{_includedir}/path_utils.h +%{_libdir}/libpath_utils.so +%{_libdir}/pkgconfig/path_utils.pc +%doc README doc/html/ + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%changelog +* Wed Aug 11 2010 Stephen Gallagher <sgallagh@redhat.com> - @PACKAGE_VERSION@-0 +- Automated build of libpath_utils |