Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
yum install mock sangoma-rpm-helper sangoma-devel
cd /usr/src
mkdir asterisk-srpm
cd asterisk-srpm
yumdownloader --source asterisk15-15.5.0
rpm -qlp asterisk15-15.5.0-3.sng7.src.rpm
rpm -U asterisk15-15.5.0-3.sng7.src.rpm
cp ~/rpmbuild/SPECS/asterisk15.spec asterisk15.spec
cp -R ~/rpmbuild/SOURCES/* .
rm -Rf ~/rpmbuild #reset rpmbuild for future builds
touch Makefile

...

Upload the following Makefile to the directory

Code Block
BUILD_NUMBER ?= 1
SHMZRELEASE ?= 1
MAJVERSION ?= 7
MINVERSION ?= 1
SRCEXT ?= .tar.gz
TARFLAGS ?= -czf

MOCKPREFIX ?= sng
DIST = sng7

MOCKUNIQUE = $(NAME)-$(ARCH)

# disable misdn
EXTRADEFINE ?= --without misdn

# needs to be last line as first match wins,
# meaning above settings override the globals
# in the include below
include schmooze-rpm

# remove tarbal on nuke
nuke: clean mynuke

mynuke:
	rm -rf $(subst 12,,$(NAME))*$(SRCEXT)

# force download of non-name tarbal
.PHONY: $(NAME)-$(VERSION)$(SRCEXT)
$(NAME)-$(VERSION)$(SRCEXT): upstreams

Add Patches

wget https://wiki.freepbx.org/display/PPS/Applying+patches+to+Asterisk+in+distro+SNG7?preview=%2F116719647%2F125435995%2FMakefile -O Makefile

Add Patches, either in the SPEC file or in the Asterisk tarball 

Code Block
<NOW ADD YOUR PATCHES>

...