Wanpipe Driver RPM Build

    All wanpipe drivers support RPM building.

     

     

    1. Building RPMS using rpmbuild
      This is the new official way of building RPMS.  Supported from 3.5.18 release an forward.
      The other ways of building rpm are still supported for backward compatibility. 
      -- 
    2. Building RPMS using Make
      If you are a power user and want most flexibility and a standardized way of building RPMs please use the MAKE method.  
      -- 
    3. Building RPMS using Setup
      If you have never build an RPM and want  to build wanpipe RPM.
      --
    4. Appendix: Setup Usage

     

     

     


    Building Wanpipe RPMS using rpmbuild

    1. Download latest wanpipe release
      -> Location: wanpipe releases     

     

    Each RPM build will be located in /usr/src/redhat/RPMS  directory

    By default rpmbuild will use the currently running kernel and current system architecture.
    These parameters can be changed if one is building for a different system.

    1. Wanpipe RPM Build Default
      [supports FreeTDM, TDM API/Libsangoma, FreeSWITCH ]


      -> rpmbuild -tb wanpipe-<ver>.tgz 
      or
      -> rpmbuild -tb wanpipe-<ver>.tgz  --define 'kernel 2.6.32'  \
                                                              --define 'ksrc /usr/src/linux' --define 'karch i686'



       
    2. Wanpipe RPM Build for Asterisk
      [ supports Dahdi,Zaptel as well as FreeTDM,TDM API/Libsangoma, FreeSWITCH]

      ->  rpmbuild -tb wanpipe-<ver>.tgz --define 'with_dahdi 1' --define 'dahdi_dir /usr/src/dahdi'  \
                                                              --define 'dahdi_ver 2.4.0'


      ->  rpmbuild -tb wanpipe-<ver>.tgz --define 'with_zaptel 1' --define 'zaptel_dir /usr/src/zaptel' \
                                                              --define 'zaptel_ver 1.4.0'


      Note: That last option 'dahdi_ver' is used as part of the rpm name to identify for which dahdi/zaptel version the rpm is built for.

     


    Building Wanpipe RPMS using Make


    1. Download latest wanpipe release
      -> Location: wanpipe releases    
    2. Untar wanpipe release in /usr/src directory
      -> tar xfz wanpipe-<ver>.tgz
      -> cd wanpipe-<ver>/ 
    3. Build wanpipe drivers using MAKE
      -> make all_src ZAPDIR=<absolute path to zaptel or dahdi directory>
       
      For more options please study the Makefile.
      The Makefile will build all drivers and utilities in the current directory three.  
    4. Install wanpipe drivers into a aribrary directory
      -> make install INSTALLPREFIX=/tmp/wanpipe_build/  
    5. Use the Wanpipe RPM Spec file to build the RPM
      -> Spec file location  cd rpmspec/

     



    Building Wanpipe RPMS using >> ./Setup install

    1. Download latest wanpipe release
      -> Location: wanpipe releases  
    2. Untar wanpipe release in /usr/src directory
      -> tar xfz wanpipe-<ver>.tgz
      -> cd wanpipe-<ver>/  
    3. Building RPMS
      The ./Setup script is used to build RPMS.
      Depending on what drivers you need, you have to tell Setup to build rpms with certain protocols/drivers.

      Bulild RPMs for Asterisk/Zaptel: Modules and Utilities separately
      -> ./Setup buildrpm  --split_rpms --protocol=TDM --zaptel-path=/usr/src/zaptel

      Building RPMs for Asterisk/Zaptel: One big rpm (modules + utilities)
      -> ./Setup buildrpm --protocol=TDM --zaptel-path=/usr/src/zaptel


      Building RPMs for Asterisk/Zaptel/BRI: One big rpm (modules + utilities)
      ->./Setup buildrpm --silent --no-zaptel-compile --protocol=TDM-SMG_BRI --with-zaptel=/usr/src/zaptel   --split_rpm

      Building RPMs for Asterisk/BRI: One big rpm (modules + utilities)
      ->./Setup buildrpm --silent - --protocol=SMG_BRI    --split_rpm

      (Note: Please make sure there is symbolic link to Asterisk source directory in /usr/src/


      Building RPMs for WAN/Data/TDM API

      Wan/Data/TDM API drives are installed by default so no extra options are needed
      -> ./Setup buildrpm
      or
      -> ./Setup buildrpm --split_rpms
       
      Bulding RPMs for WAN/Data/TDM API and Asterisk/Zaptel
      -> ./Setup bulidrpm --protocol=DEF-TDM   --zaptel-path=/usr/src/zaptel
      or
      -> ./Setup bulidrpm --split_rpms --protocol=DEF-TDM   --zaptel-path=/usr/src/zaptel
       
       
      The Setup script will prompt you with a summary of what its trying to do and what kernel it will build against.  At this point you can choose to proceed or stop the build process.
       
       
      Building RPMS non interactively
        
      In some cases a non interactive build process is required.  The ./Setup script accepts the --silent flag that will default all options and build the RPM without any questions.
         
      -> ./Setup buildrpm --protocols=TDM --silent --zaptel-path=/usr/src/zaptel

     


    Building RPMS (Non Interactive) 

    In some cases a non interactive build process is required.  The ./Setup script accepts the --silent flag that will default all options and build the RPM without any questions.

    1. -> ./Setup buildrpm --protocols=TDM --silent

     


     Setup Installation Script Usage

    ./Setup {command} [ optinal command extensions ]

            commands:
            ---------
            install        : Install/Upgrade WANPIPE
            remove     : Uninstall WANPIPE
            utility         : Re-compile WANPIPE Tools/Utilities
            drivers      : Re-install and Re-compile
                               WANPIPE kernel device drivers
            buildrpm   : Build the custom RPM binary for the
                               current system.
               
            helprpm    : RPM build help information.

            <any key>: Help

            optional command extensions:
            ----------------------------

            --silent    : Non interactive. Run all above commands
                             without user interaction.  Thus default
                             environment values are assumed such
                             as:

                            Linux source dir:  /lib/modules/2.6.9-16.ELsmp/build
                            Architecture    :  uname -m
                            Kernel Image    :  uname -r

            --builddir  : Install WANPIPE package into a virtual
                              directory. The path must be
                              absolute and must exist.  Default is set
                              to system root( / ).
                              eg: --builddir=/root/wanpipe_build

     

            --split_rpms: Option to split the rpm build into
                                util and modules package.  Thus,
                                splitting user space utilities and
                                kernel modules into two packages.
                                Default: one rpm package containing
                                   both utilites and modules.
                                eg: ./Setup buildrpm --split_rpms  

            --with-linux: Build modules using a custom linux
                               source directory.  Default value is
                               set to /lib/modules/2.6.9-16.ELsmp/build
                               eg: --with-linux=/usr/src/linux-2.4.4

            --arch      : Build modules using a custom defined
                              architecture. (i686 or i586)
                              By default: (uname -m)
                              eg: --arch=i686

       
            --linux-vanilla: Compile wanpipe drivers as if the
                                   current linux source is a vanilla source.
                                   Used to remove the default assumption that
                                   stock distribution  kernels pull changes
                                   from higher linux kernel versions.

            --no-gcc-debug: Remove -g option out of gcc compile argumetns.

            --usr-cc           :Use diffrent c compler then default $(CC)

            --ocflags          : Extra compile flags to append to CFLAGS during driver compilation

            --kbuild-verbose : Enable linux 2.6. kernel build verbosity

            --noautostart    : Do not install boot start scripts to start wanpipe on boot

            --zaptel-path    : Source path to zaptel

            --no-zaptel-compile: Do not compile zaptel during installation
                                            Default mode is to compile zaptel source during install.

            --gz-modules    : Gzip the kernel modules when installing in /lib/modules directory

            --protocol         : Select protocol compilation options.

     

    SS7 :              SS7 Level 2 API protocol support
    BITSTRM:       BitStreaming protocol Support
    BSCSTRM:     Nasdaq BiSync API protocol
    BISYNC:          Multi-Point Bisync support
    SDLC:             SLDC API protocol support
    EDU:               Wan EduKit driver support
    POS:               POS (S509/S515) hw/prot support
    MPAPI:            Multi Protocol API: X25, LAPB, DSP
    ADCCP:          ADCCP API protocol (LAPB)
    TDM:              Hardware TDM Voice support for Asterisk PBX
    BRI:                Hardware/Software support for BRI and Sangoma Media Gateway