Mock And Iaxmodem

Home » CentOS » Mock And Iaxmodem
CentOS 2 Comments

I am trying to build an rpm package for iaxmodem-1.2.0. At the moment I am still trying to get a working spec file put together. I have managed to get an SRPM produced but the binary build from this fails due to there being no install task in the Makefile.in provided with the source.

I have found a spec file from opensuse that provides this in the install portion:

%build
[ “%{buildroot}” != ‘/’ ] && rm -rf %{buildroot}
# . . .
./configure
%{__make} %{?_smp_mflags}

%install
# install the bunch manually mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d $RPM_BUILD_ROOT/etc/iaxmodem
$RPM_BUILD_ROOT/usr/bin
%{__install} -m 644 %{S:1} $RPM_BUILD_ROOT/etc/logrotate.d/iaxmodem
%{__install} -D -m 755 iaxmodem %{buildroot}%{_sbindir}/iaxmodem
%{__install} -D -m 644 iaxmodem.1 %{buildroot}%{_mandir}/man1/iaxmodem.1
perl -pi -e ‘s,/usr/local/,/usr/,g’ iaxmodem.init.fedora
%{__install} -D -m 755 iaxmodem.init.suse
%{buildroot}%{_initrddir}/iaxmodem

But in mock I get a failure on the build because make has no install task.

+ make install DESTDIR=/builddir/build/BUILDROOT/iaxmodem-1.2.0-1.el6.x86_64
make: *** No rule to make target `install’. Stop. RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.apiDwk (%install)
Bad exit status from /var/tmp/rpm-tmp.apiDwk (%install)
Child return code was: 1

I have next to no experience with building on Linux and I have no idea of what I should do to resolve this. What are my options at this point?

2 thoughts on - Mock And Iaxmodem

  • Thank you very much. I had to make several small changes but with those in place your spec file works for me on CentOS-6.4. Libtiff-tools does not exist for CentOS but the requite components are included with libtiff. Libtiff needs a BuildRequires: libtiff-devel added. And as I do not have your Source2: .init file I copy the one provided in the sources for fedora instead.

    Name: iaxmodem Version: 1.2.0
    Release: 1%{?dist}
    Summary: IAX software fax modem Source:
    http://dl.sourceforge.net/iaxmodem/%{name}-%{version}.tar.gz
    #Source2: %{name}.init URL: http://iaxmodem.sourceforge.net Group: Applications License: GPL
    BuildRoot: %{_tmppath}/build-%{name}-%{version}
    BuildRequires: gcc BuildRequires: glibc-devel BuildRequires: automake BuildRequires: autoconf BuildRequires: libtiff-devel Requires: libtiff

    %description IAXmodem is a software modem written in C that uses an IAX channel
    (commonly provided by an Asterisk PBX system) instead of a traditional phone line and uses a DSP library instead of DSP hardware chipsets.

    IAXmodem was originally conceived to function as a fax modem usable with HylaFAX, and it does that well. However IAXmodem also has been known to function with mgetty+sendfax and efax.

    To accomplish this IAXmodem interfaces an IAX library known as libiax2 with a DSP library known as spandsp, and then IAXmodem interfaces the DSP library with a tty device node for interfacing with modem applications.

    %prep
    %setup -q

    %build
    %configure
    %{__make} %{?_smp_mflags}

    %install mkdir -p $RPM_BUILD_ROOT/%{_bindir}
    mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/
    mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
    install %{name} $RPM_BUILD_ROOT/%{_bindir}
    install %{name}.1 $RPM_BUILD_ROOT/%{_mandir}/man1/
    #install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
    %{__install} -D -m 755 iaxmodem.init.fedora
    %{buildroot}%{_initrddir}/iaxmodem

    %clean rm -rf %{buildroot}

    %files
    %defattr(644,root,root,755)
    %attr(755,root,root) %{_bindir}/*
    %attr(754,root,root) /etc/rc.d/init.d/%{name}
    %{_mandir}/man1/*
    %doc TODO README FAQ CHANGES *.ttyIAX

    %changelog
    * Fri Apr 05 2013 James B. Byrne
    – Rebuild for CentOS-6.4

    * Thu Feb 03 2011 Reindl Harald
    – Rebuild for Fedora 14

    * Sat Nov 20 2010 Reindl Harald
    – Rebuild with GCC 4.4.5

    * Sat Nov 6 2010 Reindl Harald
    – Build x86_64 with SSE4-Support

    * Wed Sep 22 2010 Reindl Harald
    – Downgrade to 1.1.1 because 1.2 does not work
    – And upgrade again to 1.2.0 because stoopid people call fax per phone

    * Sun Sep 19 2010 Reindl Harald
    – First RPM for Fedora
    – Add “libtiff-tools” as Requirement because it provides:
    – * /usr/bin/fax2ps
    – * /usr/bin/fax2tiff
    – * /usr/bin/tiff2pdf
    – * /usr/bin/tiff2ps

    Now to see if it runs.

    Thank you again.

  • James B. Byrne wrote:

    That would be due to the Makefile not having been built with an install target. configure builds the Makefile dynamically, but something there isn’t telling it to make an install target.

    You might look at the configure, and see what why it’s not creating install as a target.

    mark, once a makefile expert

LEAVE A COMMENT