diff --git a/.travis.yml b/.travis.yml index 672fccf..884a706 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,20 @@ language: c compiler: gcc addons: apt: packages: - check - splint -script: ./autogen.sh + # for "make rpm" + - doxygen + - rpm +script: RPMBUILDOPTS_="--nodeps --define '_without_check 1'"; + ./autogen.sh && ./configure --enable-syslog-tests - && make && make check && make distcheck + && sed "s|RPMBUILDOPTS =|\\0 ${RPMBUILDOPTS_}|" Makefile | make -f- rpm sudo: false notifications: irc: "irc.freenode.net#clusterlabs-dev" diff --git a/libqb.spec.in b/libqb.spec.in index 403e88c..ed2ddb6 100644 --- a/libqb.spec.in +++ b/libqb.spec.in @@ -1,69 +1,72 @@ +%bcond_without check %bcond_without syslog_tests %global alphatag @alphatag@ %global numcomm @numcomm@ %global dirty @dirty@ Name: libqb Version: @version@ Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} Summary: An IPC library for high performance servers Group: System Environment/Libraries License: LGPLv2+ URL: https://github.com/ClusterLabs/libqb Source0: https://fedorahosted.org/releases/q/u/quarterback/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.xz BuildRequires: autoconf automake libtool doxygen procps check-devel %description libqb provides high-performance, reusable features for client-server architecture, such as logging, tracing, inter-process communication (IPC), and polling. %prep %setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} %build ./autogen.sh %configure --disable-static \ %{?with_syslog_tests:--enable-syslog-tests} make %{?_smp_mflags} +%if 0%{?with_check} %check make check +%endif %install make install DESTDIR=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/libqb %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc COPYING %{_sbindir}/qb-blackbox %{_libdir}/libqb.so.* %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} pkgconfig %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %files devel %doc COPYING README.markdown %{_includedir}/qb/ %{_libdir}/libqb.so %{_libdir}/pkgconfig/libqb.pc %{_mandir}/man3/qb*3* %{_mandir}/man8/qb-blackbox.8.gz %changelog * @date@ Autotools generated version - @version@-1-@numcomm@.@alphatag@.@dirty@ - Autotools generated version