[libcapifax] Initial import (#591900). Corrected mail address

Louis Lagendijk llagendijk at fedoraproject.org
Wed Sep 1 21:41:31 UTC 2010


commit 05e1a6831cfd53fe644506d51027d8e9970439ee
Author: Louis Lagendijk <louis at lagendijk.xs4all.nl>
Date:   Mon Aug 23 23:34:23 2010 +0200

    Initial import (#591900).
    Corrected mail address

 .gitignore                       |    1 +
 capifax-jmb3-fix-autofoo.patch   |  105 +++++++++++++++++++++++
 capifax-jmb3-fix-cups.patch      |   67 +++++++++++++++
 capifax-jmb3-skip-internal.patch |  173 ++++++++++++++++++++++++++++++++++++++
 capifax-jmb4-fix-pc.patch        |   81 ++++++++++++++++++
 capifax-use-capi20-pc.patch      |  114 +++++++++++++++++++++++++
 libcapifax.spec                  |   92 ++++++++++++++++++++
 sources                          |    1 +
 8 files changed, 634 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..fd05cfd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/capifax-0.7.3.tar.bz2
diff --git a/capifax-jmb3-fix-autofoo.patch b/capifax-jmb3-fix-autofoo.patch
new file mode 100644
index 0000000..62f77cb
--- /dev/null
+++ b/capifax-jmb3-fix-autofoo.patch
@@ -0,0 +1,105 @@
+diff -C 4 -r capifax-0.7.3.org/capifax/configure.in capifax-0.7.3-jmb3/capifax/configure.in
+*** capifax-0.7.3.org/capifax/configure.in	2009-04-18 21:25:51.000000000 +0200
+--- capifax-0.7.3-jmb3/capifax/configure.in	2009-05-15 21:48:02.000000000 +0200
+***************
+*** 1,17 ****
+! AC_INIT([capifax], 0.7.2, http://capifax.v3v.de)
+  AC_PREFIX_DEFAULT(/usr)
+  AM_INIT_AUTOMAKE
+! AC_CONFIG_SRCDIR([.])
+! AC_CONFIG_HEADER(config_compile.h)
+  
+- AC_PROG_LIBTOOL
+  AC_PROG_CC
+  
+! AC_HEADER_STDC
+! AC_HEADER_SYS_WAIT
+  
+  CPPFLAGS="$CPPFLAGS -I../libcapifax"
+  LIBS="-lcapifax"
+  
+! AC_CONFIG_FILES([Makefile])
+! AC_OUTPUT
+--- 1,14 ----
+! AC_INIT([capifax], 0.7.3, http://capifax.v3v.de)
+  AC_PREFIX_DEFAULT(/usr)
+  AM_INIT_AUTOMAKE
+! AC_CONFIG_HEADER(config.h)
+  
+  AC_PROG_CC
+  
+! AM_PROG_LIBTOOL
+! AC_PROG_LIBTOOL
+  
+  CPPFLAGS="$CPPFLAGS -I../libcapifax"
+  LIBS="-lcapifax"
+  
+! AC_OUTPUT([Makefile])
+diff -C 4 -r capifax-0.7.3.org/config_compile.h.in capifax-0.7.3-jmb3/config_compile.h.in
+*** capifax-0.7.3.org/config_compile.h.in	2009-04-26 20:16:10.000000000 +0200
+--- capifax-0.7.3-jmb3/config_compile.h.in	2009-05-15 21:48:28.000000000 +0200
+***************
+*** 32,39 ****
+--- 32,43 ----
+  
+  /* Define to 1 if you have the <unistd.h> header file. */
+  #undef HAVE_UNISTD_H
+  
++ /* Define to the sub-directory in which libtool stores uninstalled libraries.
++    */
++ #undef LT_OBJDIR
++ 
+  /* Name of package */
+  #undef PACKAGE
+  
+  /* Define to the address where bug reports for this package should be sent. */
+diff -C 4 -r capifax-0.7.3.org/configure.in capifax-0.7.3-jmb3/configure.in
+*** capifax-0.7.3.org/configure.in	2009-04-26 19:12:30.000000000 +0200
+--- capifax-0.7.3-jmb3/configure.in	2009-05-15 20:12:56.000000000 +0200
+***************
+*** 1,5 ****
+! AC_INIT([capifax], 0.7.2, http://capifax.v3v.de)
+  AC_PREFIX_DEFAULT(/usr)
+  
+  AC_ARG_ENABLE(capifax,       [  --disable-capifax       do not build capifax app (default: enabled) ], [ DISABLE_CAPIFAX="1" ], [ DISABLE_CAPIFAX="0" ])
+  AC_ARG_ENABLE(boost,         [  --disable-boost         do not increase process priority (default: enabled) ], [ WITH_BOOST="0" ], [ WITH_BOOST="1" ])
+--- 1,5 ----
+! AC_INIT([capifax], 0.7.3, http://capifax.v3v.de)
+  AC_PREFIX_DEFAULT(/usr)
+  
+  AC_ARG_ENABLE(capifax,       [  --disable-capifax       do not build capifax app (default: enabled) ], [ DISABLE_CAPIFAX="1" ], [ DISABLE_CAPIFAX="0" ])
+  AC_ARG_ENABLE(boost,         [  --disable-boost         do not increase process priority (default: enabled) ], [ WITH_BOOST="0" ], [ WITH_BOOST="1" ])
+diff -C 4 -r capifax-0.7.3.org/libcapifax/config_compile.h.in capifax-0.7.3-jmb3/libcapifax/config_compile.h.in
+*** capifax-0.7.3.org/libcapifax/config_compile.h.in	2009-04-26 20:15:58.000000000 +0200
+--- capifax-0.7.3-jmb3/libcapifax/config_compile.h.in	2009-05-15 21:48:15.000000000 +0200
+***************
+*** 38,45 ****
+--- 38,49 ----
+  
+  /* Define to 1 if you have the <unistd.h> header file. */
+  #undef HAVE_UNISTD_H
+  
++ /* Define to the sub-directory in which libtool stores uninstalled libraries.
++    */
++ #undef LT_OBJDIR
++ 
+  /* Name of package */
+  #undef PACKAGE
+  
+  /* Define to the address where bug reports for this package should be sent. */
+diff -C 4 -r capifax-0.7.3.org/libcapifax/configure.in capifax-0.7.3-jmb3/libcapifax/configure.in
+*** capifax-0.7.3.org/libcapifax/configure.in	2009-04-26 19:12:34.000000000 +0200
+--- capifax-0.7.3-jmb3/libcapifax/configure.in	2009-05-15 20:13:26.000000000 +0200
+***************
+*** 1,5 ****
+! AC_INIT([libcapifax], 0.7.2, http://capifax.v3v.de)
+  AC_PREFIX_DEFAULT(/usr)
+  
+  AC_ARG_ENABLE(boost,         [  --disable-boost         do not increase process priority (default: enabled) ], [ WITH_BOOST="0" ], [ WITH_BOOST="1" ])
+  AC_ARG_WITH(spandsp,         [  --with-spandsp=(4|5|6)  specify spandsp version (default: 6) ], [SPANDSP_VERSION="$withval"], [SPANDSP_VERSION='0'])
+--- 1,5 ----
+! AC_INIT([libcapifax], 0.7.3, http://capifax.v3v.de)
+  AC_PREFIX_DEFAULT(/usr)
+  
+  AC_ARG_ENABLE(boost,         [  --disable-boost         do not increase process priority (default: enabled) ], [ WITH_BOOST="0" ], [ WITH_BOOST="1" ])
+  AC_ARG_WITH(spandsp,         [  --with-spandsp=(4|5|6)  specify spandsp version (default: 6) ], [SPANDSP_VERSION="$withval"], [SPANDSP_VERSION='0'])
diff --git a/capifax-jmb3-fix-cups.patch b/capifax-jmb3-fix-cups.patch
new file mode 100644
index 0000000..9f631bd
--- /dev/null
+++ b/capifax-jmb3-fix-cups.patch
@@ -0,0 +1,67 @@
+diff -C 4 -r capifax-0.7.3.org/cups/capifax-cups capifax-0.7.3-jmb3/cups/capifax-cups
+*** capifax-0.7.3.org/cups/capifax-cups	2009-04-27 12:01:33.000000000 +0200
+--- capifax-0.7.3-jmb3/cups/capifax-cups	2009-05-15 21:50:27.000000000 +0200
+***************
+*** 6,14 ****
+  # capifax, netcat, ghostscript, cups, (zenity [optional])
+  #
+  # Installation:
+  # 1. Add socket-printer:
+! # sudo lpadmin -p capifax -E -v socket://localhost:10234 -m raw
+  # 2. Add this script to settings->sessions for autostart.
+  # 3. Print to capifax printer, type in number and fax :-)
+  ##############################################################################
+  
+--- 6,14 ----
+  # capifax, netcat, ghostscript, cups, (zenity [optional])
+  #
+  # Installation:
+  # 1. Add socket-printer:
+! # sudo lpadmin -p capifax -E -v socket://localhost:9901 -m raw
+  # 2. Add this script to settings->sessions for autostart.
+  # 3. Print to capifax printer, type in number and fax :-)
+  ##############################################################################
+  
+***************
+*** 19,27 ****
+  CONTROLLER="1"							# Outgoing CAPI controller
+  IDENT="+00 00 00000"						# Fax-Ident No.
+  HEADER="unknown"						# Fax-Header
+  RATE="14400"							# Fax-Rate
+! CUPS_PORT="10234"						# CUPS socket printer port (sudo lpadmin -p capifax -E -v socket://localhost:10234 -m raw)
+  FAX_DIR="/tmp"							# Fax directory (for postscript and tiff)
+  DELETE_AFTER_SEND="1"						# Delete after sending?
+  GS_OPTIONS="-q -dNOPAUSE -dBATCH -sDEVICE=tiffg3 -r204x196"	# ghostscript options
+  USE_ZENITY="1"							# 1=zenity dialog, 0=xterm shell
+--- 19,27 ----
+  CONTROLLER="1"							# Outgoing CAPI controller
+  IDENT="+00 00 00000"						# Fax-Ident No.
+  HEADER="unknown"						# Fax-Header
+  RATE="14400"							# Fax-Rate
+! CUPS_PORT="9901"						# CUPS socket printer port (sudo lpadmin -p capifax -E -v socket://localhost:9901 -m raw)
+  FAX_DIR="/tmp"							# Fax directory (for postscript and tiff)
+  DELETE_AFTER_SEND="1"						# Delete after sending?
+  GS_OPTIONS="-q -dNOPAUSE -dBATCH -sDEVICE=tiffg3 -r204x196"	# ghostscript options
+  USE_ZENITY="1"							# 1=zenity dialog, 0=xterm shell
+diff -C 4 -r capifax-0.7.3.org/cups/capifax-cups-autostart.desktop capifax-0.7.3-jmb3/cups/capifax-cups-autostart.desktop
+*** capifax-0.7.3.org/cups/capifax-cups-autostart.desktop	2009-04-27 11:42:16.000000000 +0200
+--- capifax-0.7.3-jmb3/cups/capifax-cups-autostart.desktop	2009-05-15 21:50:16.000000000 +0200
+***************
+*** 1,8 ****
+  [Desktop Entry]
+  Type=Application
+  Encoding=UTF-8
+! Version=0.7
+  Name=capifax-cups
+  Name[de_DE]=capifax-cups
+  Comment[de_DE]=capifax printer
+  Comment=capifax printer
+--- 1,8 ----
+  [Desktop Entry]
+  Type=Application
+  Encoding=UTF-8
+! Version=0.7.3
+  Name=capifax-cups
+  Name[de_DE]=capifax-cups
+  Comment[de_DE]=capifax printer
+  Comment=capifax printer
diff --git a/capifax-jmb3-skip-internal.patch b/capifax-jmb3-skip-internal.patch
new file mode 100644
index 0000000..1ab0451
--- /dev/null
+++ b/capifax-jmb3-skip-internal.patch
@@ -0,0 +1,173 @@
+diff -C 4 -r capifax-0.7.3.org/AUTHORS capifax-0.7.3-jmb3/AUTHORS
+*** capifax-0.7.3.org/AUTHORS	2008-06-27 06:14:26.000000000 +0200
+--- capifax-0.7.3-jmb3/AUTHORS	2009-05-15 20:32:08.000000000 +0200
+***************
+*** 1 ****
+! Marco Zissen <maz at v3v.de>
+\ No newline at end of file
+--- 1,4 ----
+! Marco Zissen <maz at v3v.de>
+! 
+! Patches by:
+! 	Jan-Michael Brummer <jan.brummer at tabos.org>
+\ No newline at end of file
+diff -C 4 -r capifax-0.7.3.org/capifax/capifax.h capifax-0.7.3-jmb3/capifax/capifax.h
+*** capifax-0.7.3.org/capifax/capifax.h	2009-05-03 16:11:48.000000000 +0200
+--- capifax-0.7.3-jmb3/capifax/capifax.h	2009-05-25 18:15:42.000000000 +0200
+***************
+*** 32,40 ****
+  
+  #include "libcapifax.h"
+  
+  #define APPNAME        "capifax"
+! #define APPVERSION     "v0.7.3"
+  #define APPCR          "(c) Marco Zissen"
+  
+  #ifdef WIN32
+  #ifndef _TM_DEFINED
+--- 32,40 ----
+  
+  #include "libcapifax.h"
+  
+  #define APPNAME        "capifax"
+! #define APPVERSION     "v0.7.3-jmb3"
+  #define APPCR          "(c) Marco Zissen"
+  
+  #ifdef WIN32
+  #ifndef _TM_DEFINED
+diff -C 4 -r capifax-0.7.3.org/ChangeLog capifax-0.7.3-jmb3//ChangeLog
+*** capifax-0.7.3.org/ChangeLog		2009-04-27 12:17:56.000000000 +0200
+--- capifax-0.7.3-jmb3/ChangeLog	2009-05-25 18:15:39.000000000 +0200
+***************
+*** 1,4 ****
+--- 1,14 ----
++ v0.7.3-jmb3:
++ - On auto controller select skip internal controller
++ 
++ v0.7.3-jmb2:
++ - Fix version information
++ - Set cups port to 9901
++ 
++ v0.7.3-jmb1:
++ - Add valid cip value check
++ 
+  v0.7.3:
+  - CUPS fax printer script
+  - get image-size as bytes_total in real time handler
+  - fix: automatically choose SPANDSP_VERSION
+diff -C 4 -r capifax-0.7.3.org/libcapifax/libcapifax.c capifax-0.7.3-jmb3/libcapifax/libcapifax.c
+*** capifax-0.7.3.org/libcapifax/libcapifax.c	2009-05-03 16:16:13.000000000 +0200
+--- capifax-0.7.3-jmb3/libcapifax/libcapifax.c	2009-05-25 18:24:48.000000000 +0200
+***************
+*** 328,335 ****
+--- 328,336 ----
+      unsigned int _ApplId = -1;    
+      int i;
+      int start = 0;
+      int end = 0;
++     int skip = -1;
+      
+      // Test CAPI
+      if(bchannels == 0 && controllers == 0 && ApplId == -1)
+      {
+***************
+*** 353,362 ****
+--- 354,368 ----
+          for(i=1; i<=capiprofile.ncontroller; i++)
+          {
+              struct capi_profile capiprofile2; 
+  		 	CAPI20_GET_PROFILE(i, (unsigned char *)&capiprofile2);
++             char *pnManu = capiprofile2.manu;
+              bchannels += capiprofile2.nbchannel;            
+              dbg(2, "Found controller #%d with %d B-channel(s)", i, capiprofile2.nbchannel);
++             if ( capiprofile2.nbchannel == 2 && pnManu[ 3 ] == 0x00 ) {
++ 	            dbg(2, "-> skipping internal controller %d", i);
++ 	            skip = i;
++ 	        }
+          }
+  
+          dbg(1, "Found %d controllers!", capiprofile.ncontroller);
+  
+***************
+*** 397,404 ****
+--- 403,414 ----
+      }
+  
+      // Listen to CAPI controller(s)
+      for(i=start; i<=end; i++) {
++     	if ( controller <= 0 && skip == i ) {
++     		// if we are using auto channels, skip internal controller
++     		continue;
++     	}
+          LISTEN_REQ(&cMsg, ApplId, 0, i, 0x3ff, 0x1FFF03FF, 0, NULL, NULL);
+          dbg(1, "Listen to controller #%d ...", i);
+      }
+      
+***************
+*** 481,488 ****
+--- 491,499 ----
+      char SourcePhoneNumber[256];
+      char TargetPhoneNumber[256];            
+      int i;
+      int con = -1;
++     int cip = -1;
+  
+      // Get Msg-Nr. & Controller
+      iMsgNr = cMsg.Messagenumber;
+  
+***************
+*** 494,507 ****
+      case CAPI_CONNECT:
+          PLCI = CONNECT_IND_PLCI(&cMsg);
+          capi_get_source_no(&cMsg, SourcePhoneNumber);
+          capi_get_target_no(&cMsg, TargetPhoneNumber);
+  
+          // Already in queue?
+          tmp_conid = capi_find_plci(PLCI);
+  
+          // Manually receive event (can be called by external application)
+!         if(tmp_conid == -1 && ev_receive != NULL) 
+          {
+              char *file;
+              tmp_conid = capi_get_free();
+  
+--- 505,519 ----
+      case CAPI_CONNECT:
+          PLCI = CONNECT_IND_PLCI(&cMsg);
+          capi_get_source_no(&cMsg, SourcePhoneNumber);
+          capi_get_target_no(&cMsg, TargetPhoneNumber);
++         cip = CONNECT_IND_CIPVALUE( &cMsg );
+  
+          // Already in queue?
+          tmp_conid = capi_find_plci(PLCI);
+  
+          // Manually receive event (can be called by external application)
+!         if(tmp_conid == -1 && cip != 0 && ev_receive != NULL) 
+          {
+              char *file;
+              tmp_conid = capi_get_free();
+  
+diff -C 4 -r capifax-0.7.3.org/libcapifax/libcapifax.h capifax-0.7.3-jmb3/libcapifax/libcapifax.h
+*** capifax-0.7.3.org/libcapifax/libcapifax.h	2009-05-03 16:11:46.000000000 +0200
+--- capifax-0.7.3-jmb3/libcapifax/libcapifax.h	2009-05-25 18:15:50.000000000 +0200
+***************
+*** 122,130 ****
+  #endif
+  
+  #define EXTERN                  extern
+  #define LIBNAME                 "libcapifax"
+! #define LIBVER                  "v0.7.3"
+  #define LIBCR                   "(c) 2008-2009 Marco Zissen"
+  
+  typedef enum capifax_phase_t
+  {
+--- 122,130 ----
+  #endif
+  
+  #define EXTERN                  extern
+  #define LIBNAME                 "libcapifax"
+! #define LIBVER                  "v0.7.3-jmb3"
+  #define LIBCR                   "(c) 2008-2009 Marco Zissen"
+  
+  typedef enum capifax_phase_t
+  {
diff --git a/capifax-jmb4-fix-pc.patch b/capifax-jmb4-fix-pc.patch
new file mode 100644
index 0000000..fd08c3a
--- /dev/null
+++ b/capifax-jmb4-fix-pc.patch
@@ -0,0 +1,81 @@
+diff -C4 -r capifax-0.7.3-jmb3/capifax/capifax.h capifax-0.7.3-jmb4/capifax/capifax.h
+*** capifax-0.7.3-jmb3/capifax/capifax.h	2009-05-25 18:15:42.000000000 +0200
+--- capifax-0.7.3-jmb4/capifax/capifax.h	2010-05-12 21:53:13.000000000 +0200
+***************
+*** 32,40 ****
+  
+  #include "libcapifax.h"
+  
+  #define APPNAME        "capifax"
+! #define APPVERSION     "v0.7.3-jmb3"
+  #define APPCR          "(c) Marco Zissen"
+  
+  #ifdef WIN32
+  #ifndef _TM_DEFINED
+--- 32,40 ----
+  
+  #include "libcapifax.h"
+  
+  #define APPNAME        "capifax"
+! #define APPVERSION     "v0.7.3-jmb4"
+  #define APPCR          "(c) Marco Zissen"
+  
+  #ifdef WIN32
+  #ifndef _TM_DEFINED
+diff -C4 -r capifax-0.7.3-jmb3/ChangeLog capifax-0.7.3-jmb4/ChangeLog
+*** capifax-0.7.3-jmb3/ChangeLog	2009-05-25 18:15:39.000000000 +0200
+--- capifax-0.7.3-jmb4/ChangeLog	2010-05-12 21:52:12.000000000 +0200
+***************
+*** 1,4 ****
+--- 1,7 ----
++ v0.7.3-jmb4:
++ - Fix libdir in capifax.pc.in
++ 
+  v0.7.3-jmb3:
+  - On auto controller select skip internal controller
+  
+  v0.7.3-jmb2:
+diff -C4 -r capifax-0.7.3-jmb3/libcapifax/capifax.pc.in capifax-0.7.3-jmb4/libcapifax/capifax.pc.in
+*** capifax-0.7.3-jmb3/libcapifax/capifax.pc.in	2009-04-13 04:22:02.000000000 +0200
+--- capifax-0.7.3-jmb4/libcapifax/capifax.pc.in	2010-05-12 21:51:39.000000000 +0200
+***************
+*** 1,7 ****
+  prefix=@prefix@
+  exec_prefix=@exec_prefix@
+! libdir=$@libdir@
+  includedir=@includedir@
+  
+  Name: capifax
+  Description: Fax through CAPI via Soft-DSP
+--- 1,7 ----
+  prefix=@prefix@
+  exec_prefix=@exec_prefix@
+! libdir=@libdir@
+  includedir=@includedir@
+  
+  Name: capifax
+  Description: Fax through CAPI via Soft-DSP
+diff -C4 -r capifax-0.7.3-jmb3/libcapifax/libcapifax.h capifax-0.7.3-jmb4/libcapifax/libcapifax.h
+*** capifax-0.7.3-jmb3/libcapifax/libcapifax.h	2009-05-25 18:15:50.000000000 +0200
+--- capifax-0.7.3-jmb4/libcapifax/libcapifax.h	2010-05-12 21:53:08.000000000 +0200
+***************
+*** 122,130 ****
+  #endif
+  
+  #define EXTERN                  extern
+  #define LIBNAME                 "libcapifax"
+! #define LIBVER                  "v0.7.3-jmb3"
+  #define LIBCR                   "(c) 2008-2009 Marco Zissen"
+  
+  typedef enum capifax_phase_t
+  {
+--- 122,130 ----
+  #endif
+  
+  #define EXTERN                  extern
+  #define LIBNAME                 "libcapifax"
+! #define LIBVER                  "v0.7.3-jmb4"
+  #define LIBCR                   "(c) 2008-2009 Marco Zissen"
+  
+  typedef enum capifax_phase_t
+  {
diff --git a/capifax-use-capi20-pc.patch b/capifax-use-capi20-pc.patch
new file mode 100644
index 0000000..ba5aa49
--- /dev/null
+++ b/capifax-use-capi20-pc.patch
@@ -0,0 +1,114 @@
+*** capifax/configure.in.org	2010-05-01 22:23:39.000000000 +0200
+--- capifax/configure.in	2010-05-01 22:24:49.000000000 +0200
+***************
+*** 6,14 ****
+  AC_PROG_CC
+  
+  AM_PROG_LIBTOOL
+  AC_PROG_LIBTOOL
+  
+  CPPFLAGS="$CPPFLAGS -I../libcapifax"
+! LIBS="-lcapifax"
+  
+  AC_OUTPUT([Makefile])
+--- 6,17 ----
+  AC_PROG_CC
+  
+  AM_PROG_LIBTOOL
+  AC_PROG_LIBTOOL
++ PKG_CHECK_MODULES([CAPI20], [capi20])
+  
+  CPPFLAGS="$CPPFLAGS -I../libcapifax"
+! 
+! AC_SUBST(CAPI20_LIBS)
+! AC_SUBST(CAPI20_CFLAGS)
+  
+  AC_OUTPUT([Makefile])
+*** libcapifax/configure.in.org	2010-01-30 22:19:53.000000000 +0100
+--- libcapifax/configure.in	2010-05-01 22:15:55.000000000 +0200
+***************
+*** 35,51 ****
+  	fi	
+  fi
+  AC_MSG_RESULT($with_spandsp)
+  AM_CONDITIONAL(WITH_SPANDSP, test "x$with_spandsp" != "xno")
+! AC_CHECK_LIB(capi20, main, [], AC_MSG_ERROR("-lcapi20 missing!"))
+! 
+  AC_SUBST(SPANDSP_VERSION)
+  AC_SUBST(WITH_BOOST)
+  AC_SUBST(CAPI_CONNECTIONS)
+  AC_SUBST(CAPI_PACKETS)
+  AC_SUBST(CAPI_BUFFERCNT)
+  AC_SUBST(CAPI_BCHANNELS)
+  AC_SUBST(CAPI_CIP)
+  
+  AC_HEADER_STDC
+  AC_HEADER_SYS_WAIT
+  
+--- 35,52 ----
+  	fi	
+  fi
+  AC_MSG_RESULT($with_spandsp)
+  AM_CONDITIONAL(WITH_SPANDSP, test "x$with_spandsp" != "xno")
+! PKG_CHECK_MODULES([CAPI20], [capi20])
+  AC_SUBST(SPANDSP_VERSION)
+  AC_SUBST(WITH_BOOST)
+  AC_SUBST(CAPI_CONNECTIONS)
+  AC_SUBST(CAPI_PACKETS)
+  AC_SUBST(CAPI_BUFFERCNT)
+  AC_SUBST(CAPI_BCHANNELS)
+  AC_SUBST(CAPI_CIP)
++ AC_SUBST(CAPI20_LIBS)
++ AC_SUBST(CAPI20_CFLAGS)
+  
+  AC_HEADER_STDC
+  AC_HEADER_SYS_WAIT
+  
+*** libcapifax/Makefile.am.org	2010-05-01 22:13:33.000000000 +0200
+--- libcapifax/Makefile.am	2010-05-01 22:18:23.000000000 +0200
+***************
+*** 3,19 ****
+  lib_LTLIBRARIES=libcapifax.la
+  
+  libcapifax_la_SOURCES=libcapifax.c alaw_ulaw.c
+  
+! libcapifax_la_LDFLAGS=-version-info $(LIBRARY_VERSION) -lcapi20 -lspandsp
+  
+  libcapifax_la_CFLAGS=-DSPANDSP_VERSION=$(SPANDSP_VERSION) \
+  		     -DWITH_BOOST=$(WITH_BOOST) \
+  		     -DCAPI_CONNECTIONS=$(CAPI_CONNECTIONS) \
+  		     -DCAPI_PACKETS=$(CAPI_PACKETS) \
+  		     -DCAPI_BUFFERCNT=$(CAPI_BUFFERCNT) \
+  		     -DCAPI_BCHANNELS=$(CAPI_BCHANNELS) \
+! 		     -DCAPI_CIP=$(CAPI_CIP)
+  
+  noinst_HEADERS = config_compile.h
+  include_HEADERS = libcapifax.h
+  EXTRA_DIST = capifax.pc
+--- 3,20 ----
+  lib_LTLIBRARIES=libcapifax.la
+  
+  libcapifax_la_SOURCES=libcapifax.c alaw_ulaw.c
+  
+! libcapifax_la_LDFLAGS=-version-info $(LIBRARY_VERSION) $(CAPI20_LIBS) -lspandsp
+  
+  libcapifax_la_CFLAGS=-DSPANDSP_VERSION=$(SPANDSP_VERSION) \
+  		     -DWITH_BOOST=$(WITH_BOOST) \
+  		     -DCAPI_CONNECTIONS=$(CAPI_CONNECTIONS) \
+  		     -DCAPI_PACKETS=$(CAPI_PACKETS) \
+  		     -DCAPI_BUFFERCNT=$(CAPI_BUFFERCNT) \
+  		     -DCAPI_BCHANNELS=$(CAPI_BCHANNELS) \
+! 		     -DCAPI_CIP=$(CAPI_CIP) \
+! 		     $(CAPI20_CFLAGS)
+  
+  noinst_HEADERS = config_compile.h
+  include_HEADERS = libcapifax.h
+  EXTRA_DIST = capifax.pc
+39,40c39
+< AC_CHECK_LIB(capi20, main, [], AC_MSG_ERROR("-lcapi20 missing!"))
+< 
+---
+> PKG_CHECK_MODULES([CAPI20], [capi20])
+47a47,48
+> AC_SUBST(CAPI20_LIBS)
+> AC_SUBST(CAPI20_CFLAGS)
diff --git a/libcapifax.spec b/libcapifax.spec
new file mode 100644
index 0000000..a5b3fe4
--- /dev/null
+++ b/libcapifax.spec
@@ -0,0 +1,92 @@
+Name:           libcapifax
+Version:        0.7.3
+Release:        4%{?dist}
+Summary:        Support for Sending/receiving faxes over CAPI capable devices
+Group:          System Environment/Daemons
+License:        GPLv2+
+URL:            http://capifax.v3v.de/
+Source0:        http://capifax.v3v.de/dl/capifax-%{version}.tar.bz2
+
+# the following patches are derived from the jmb4 version of capifax on http://www.tabos.org/ffgtk
+Patch0:         capifax-jmb3-fix-autofoo.patch
+Patch1:         capifax-jmb3-skip-internal.patch
+patch2:         capifax-jmb3-fix-cups.patch
+Patch3:         capifax-jmb4-fix-pc.patch
+
+# additional patch to use package config file of libcapi
+Patch4:         capifax-use-capi20-pc.patch
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires:  spandsp-devel isdn4k-utils-devel pkgconfig libtool
+
+%description
+libcapifax is a library that supports sending/receiving faxes over capi via 
+soft DSP (spandsp).
+It was originally released as part of the capifax package.
+
+%package devel
+Summary:        Development toolkit for capifax
+Group:          Development/Libraries
+Requires:       %{name} = %{version}-%{release} pkgconfig
+
+%description devel
+Development toolkit for libcapifax
+
+%prep
+%setup -q -n capifax-%{version}
+%patch0 -p1 -b .fix-autofoo
+%patch1 -p1 -b .skip-internal
+%patch2 -p1 -b .fix-cups
+%patch3 -p1 -b .fix-pc
+%patch4 -p0 -b .use-capi20-pc
+
+%build
+autoreconf --install --force
+%configure --with-spandsp=6 --with-gnu-ld --disable-rpath --enable-static=no  --disable-capifax
+#
+# Remove all rpath settings from libtool, so we do not use rpath
+#
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libcapifax/libtool
+sed -i 's|^hardcode_libdir_flag_spec_ld=.*|hardcode_libdir_flag_spec=""|g' libcapifax/libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libcapifax/libtool
+
+make %{?_smp_mflags}
+
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot} %{?_smp_mflags}
+rm %{buildroot}/%{_libdir}/libcapifax.la
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libcapifax.so.0
+%{_libdir}/libcapifax.so.0.0.7
+%doc COPYING README AUTHORS ChangeLog
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/libcapifax.h
+%{_libdir}/libcapifax.so
+%{_libdir}/pkgconfig/capifax.pc
+%doc COPYING README AUTHORS ChangeLog
+
+%clean
+rm -rf %{buildroot}
+
+%changelog
+* Fri Jul 30 2010 Louis Lagendijk <llagendijk at users.sourceforge.net> - 0.7.3-4
+- Put cleanup of buildroot back in install and clean sections
+* Fri Jul 30 2010 Louis Lagendijk <llagendijk at users.sourceforge.net> - 0.7.3-3
+- Moved cleanup of buildroot from build section to install section
+- Corrected license (GPLv2+)
+- removed cleanup of buildroot from build and clean sections
+- Added -jmb4i-fix-pc patch that replaces own patch for libcapifax.pc
+* Thu May 20 2010 Louis Lagendijk <llagendijk at users.sourceforge.net> - 0.7.3-2
+- Minor edits to specfile to correct layout
+* Fri Jan 29 2010 Louis Lagendijk <llagendijk at users.sourceforge.net> - 0.7.3-1
+- Initial version
diff --git a/sources b/sources
index e69de29..f4e393c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+98d1aefd7d25496d3fd2f25c253bfe53  capifax-0.7.3.tar.bz2


More information about the scm-commits mailing list