%global project docsis %global owner rlaager #global owner AdrianSimionov %global commitdate 20150302 %global commit 68e622ff36ac05115a3b7e74b6e116451f23ba96 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: %{project}-config-encoder Version: 0.9.8 Release: 0.1.%{commitdate}git%{shortcommit}%{?dist} Summary: Encode a DOCSIS binary configuration file License: GPLv2+ URL: http://%{project}.sf.net Source0: https://github.com/%{owner}/%{project}/archive/%{commit}.tar.gz#/%{project}-%{shortcommit}.tar.gz BuildRequires: automake libtool BuildRequires: bison bison-devel flex flex-devel BuildRequires: net-snmp-devel BuildRequires: glib2-devel BuildRequires: help2man # bundled md5 implementation Provides: bundled(md5-plumb) Requires: %{name}-data = %{version}-%{release} %description This program encodes a DOCSIS binary configuration file from a human-readable text configuration file. %package data Summary: Data files for %{name} BuildArch: noarch %description data Data files to generate a docsis configuration like with SNMP and MIB. %package doc Summary: Documentation files for %{name} BuildArch: noarch %description doc %{summary}. %prep %setup -qn%{project}-%{commit} # call configure in build section sed -i s,.*/configure.*,, autogen.sh # automake: warning: autoconf input should be named 'configure.ac', not 'configure.in' mv configure.in configure.ac sh autogen.sh %build %configure # FIXME lexer does not work in parallel, https://github.com/rlaager/docsis/issues/7 #make %{?_smp_mflags} make # documentation is separate make -C doc %install %make_install # rename binary rm -f %{buildroot}%{_bindir}/* install -m0755 -p src/%{project} %{buildroot}%{_bindir}/%{name} # generate manpage mkdir -p %{buildroot}%{_mandir}/man1 help2man %{buildroot}%{_bindir}/%{name} --no-discard-stderr -o %{buildroot}%{_mandir}/man1/%{name}.1 # move documentation to right location mkdir -p %{buildroot}%{_pkgdocdir} cp -p AUTHORS NEWS README.md %{buildroot}%{_pkgdocdir} mv %{buildroot}%{_datadir}/%{project}/*.html %{buildroot}%{_pkgdocdir} mv %{buildroot}%{_datadir}/%{project}/examples %{buildroot}%{_pkgdocdir} mkdir -p %{buildroot}%{_datadir}/%{name} mv %{buildroot}%{_datadir}/snmp %{buildroot}%{_datadir}/%{name} %check pushd tests # docsis1 and docsis2 require nonfree MIB files, https://github.com/rlaager/docsis/issues/9 rm docsis1_* docsis20* # FIXME test does not work on ARM, https://github.com/rlaager/docsis/issues/12 rm TLV_61_SubMgmtCPEIPv6PrefixList.* echo Run Tests ... sh RunTests.sh popd %files %license COPYING # FIXME prevent rpmbuild to include the whole doc folder when macro is there, bug? #doc AUTHORS NEWS README.md %dir %{_pkgdocdir} %{_pkgdocdir}/AUTHORS %{_pkgdocdir}/NEWS %{_pkgdocdir}/README.md %{_mandir}/man1/%{name}.1* %{_bindir}/%{name} %files data %{_datadir}/%{name}/ %files doc %license COPYING %dir %{_pkgdocdir} %{_pkgdocdir}/*.html %{_pkgdocdir}/examples/ %changelog * Tue Mar 03 2015 Raphael Groner - 0.9.8-0.1.20150302git68e622f - switch to rlaager cause of merged with AdrianSimionov - new pre-version 0.9.8 (mentioned in ChangeLog) - make binary executable - remove Suggests: doc subpackage - move snmp files into data subpackage * Mon Mar 02 2015 Raphael Groner - 0.9.6-6.20150218git8ef81f6 - temporarily re-enable failing test on ARM * Sun Mar 01 2015 Raphael Groner - 0.9.6-5.20150218git8ef81f6 - prevent documentation duplication - run configure once only - fix URL - R: snmp subpackage - add license to subpackages - disable failing tests, e.g. at ARM * Sat Feb 28 2015 Raphael Groner - 0.9.6-4.20150218git8ef81f6 - disable a failing test on ARM * Wed Feb 25 2015 Raphael Groner - 0.9.6-3.20150108git - fix review issues - introduce license macro - new upstream commit - remove upstreamed patches * Thu Jan 08 2015 Raphael Groner - 0.9.6-2.20140108git - apply master patches * Thu Jan 08 2015 Raphael Groner - 0.9.6-1.20140107git423fcb3 - initial