-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Debian Jessie package builder, update example configuration
- Loading branch information
Markus Lindenberg
committed
Jul 9, 2015
1 parent
260ff8b
commit b3bf29c
Showing
16 changed files
with
185 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
bin/ | ||
pkg/ | ||
packages/ | ||
gofaxd | ||
gofaxsend | ||
gofaxbuild.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM debian:jessie | ||
MAINTAINER Markus Lindenberg <[email protected]> | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN apt-get update -y && apt-get install --no-install-recommends -y -q curl build-essential ca-certificates git mercurial ruby ruby-dev | ||
|
||
RUN curl https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | tar xz -C /usr/local | ||
ENV GOROOT /usr/local/go | ||
ENV PATH $PATH:$GOROOT/bin | ||
|
||
RUN gem install fpm | ||
|
||
ADD . /usr/src/gofaxip | ||
|
||
RUN adduser --system --home /usr/src/build build | ||
USER build | ||
WORKDIR /usr/src/build | ||
|
||
CMD ["/usr/src/gofaxip/docker/build.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<configuration name="syslog.conf" description="Syslog Logger"> | ||
<!-- SYSLOG --> | ||
<!-- emerg - system is unusable --> | ||
<!-- alert - action must be taken immediately --> | ||
<!-- crit - critical conditions --> | ||
<!-- err - error conditions --> | ||
<!-- warning - warning conditions --> | ||
<!-- notice - normal, but significant, condition --> | ||
<!-- info - informational message --> | ||
<!-- debug - debug-level message --> | ||
<settings> | ||
<param name="facility" value="uucp"/> | ||
<param name="ident" value="freeswitch"/> | ||
<param name="loglevel" value="warning"/> | ||
<!-- log uuids in syslogs --> | ||
<param name="uuid" value="true"/> | ||
</settings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
echo "RejectCall: false" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,18 @@ | |
# $CALLID3 -> Recipent (SIP To-User) | ||
# | ||
|
||
[email protected] | ||
# Language / email template | ||
TEMPLATE=en | ||
|
||
# From address for all faxes / notifications | ||
[email protected] | ||
|
||
# Recipient for faxmaster (administrative) notifications | ||
[email protected] | ||
NOTIFY_FAXMASTER=never | ||
|
||
# Recipient for incoming fax | ||
[email protected] | ||
|
||
# Filetype for fax attachment | ||
FILETYPE=pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Language / email template | ||
TEMPLATE=en | ||
|
||
# From address for all faxes / notifications | ||
[email protected] | ||
|
||
# Recipient for faxmaster (administrative) notifications | ||
[email protected] | ||
NOTIFY_FAXMASTER=never | ||
|
||
# When to notify recipient / sender | ||
notify="always" | ||
|
||
# Override recipient | ||
mailaddr=$TOADDR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
|
||
set -e -x | ||
|
||
REPO="/usr/src/gofaxip" | ||
BUILD="${HOME}/gofaxip" | ||
ROOT="${HOME}/debroot" | ||
OUTPUT="${HOME}/packages" | ||
|
||
rm -rf ${BUILD} ${ROOT} ${OUTPUT} | ||
cp -r ${REPO} ${BUILD} | ||
|
||
shortid="$(cd ${REPO} && git rev-parse --short HEAD)" | ||
timestamp="$(date -d @$(cd ${REPO} && git log -1 --pretty=format:%ct) -u +%Y%m%d%H%M)" | ||
version="1.0~git${timestamp}.${shortid}" | ||
debversion="${version}" | ||
|
||
cd ${BUILD} | ||
export GOPATH=$(pwd) | ||
go install -ldflags "-X main.version '${version}'" gofaxd gofaxsend | ||
|
||
mkdir -p ${ROOT} ${OUTPUT} | ||
mkdir -p ${ROOT}/usr/bin ${ROOT}/etc ${ROOT}/lib/systemd/system ${ROOT}/usr/share/doc/gofaxip | ||
cp ${BUILD}/bin/* ${ROOT}/usr/bin/ | ||
cp ${BUILD}/AUTHORS ${BUILD}/LICENSE ${BUILD}/README.md ${ROOT}/usr/share/doc/gofaxip/ | ||
cp -r ${BUILD}/config ${ROOT}/usr/share/doc/gofaxip/config | ||
cp ${BUILD}/config/gofax.conf ${ROOT}/etc/ | ||
cp ${BUILD}/docker/gofaxip.service ${ROOT}/lib/systemd/system/ | ||
cp ${BUILD}/docker/freeswitch.service ${ROOT}/lib/systemd/system/ | ||
cp -r ${BUILD}/config/freeswitch ${ROOT}/etc/freeswitch | ||
#ToDo: Chown config | ||
|
||
fpm -f -s dir -t deb -n gofaxip \ | ||
-C "${ROOT}" \ | ||
-v "${version}" \ | ||
-p ${OUTPUT}/gofaxip_VERSION_ARCH.deb \ | ||
--description "GOfax.IP - T.38 / Fax Over IP backend for HylaFAX using FreeSWITCH" \ | ||
--category comm \ | ||
--license GPL2 \ | ||
--vendor "GONICUS GmbH" \ | ||
--url "https://github.com/gonicus/gofaxip" \ | ||
--maintainer "Markus Lindenberg <[email protected]>" \ | ||
--config-files /etc/gofax.conf \ | ||
--config-files /etc/freeswitch \ | ||
-d hylafax-server \ | ||
-d freeswitch \ | ||
-d freeswitch-mod-commands \ | ||
-d freeswitch-mod-dptools \ | ||
-d freeswitch-mod-event-socket \ | ||
-d freeswitch-mod-sofia \ | ||
-d freeswitch-mod-spandsp \ | ||
-d freeswitch-mod-tone-stream \ | ||
-d freeswitch-mod-db \ | ||
-d freeswitch-mod-syslog \ | ||
-d freeswitch-mod-logfile \ | ||
--conflicts freeswitch-sysvinit \ | ||
--conflicts freeswitch-systemd \ | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=FreeSWITCH VoIP Softswitch | ||
After=network.target local-fs.target | ||
|
||
[Service] | ||
User=uucp | ||
Group=uucp | ||
RuntimeDirectory=freeswitch | ||
PermissionsStartOnly=true | ||
ExecStartPre=/bin/chown -R uucp: /var/lib/freeswitch /var/log/freeswitch | ||
ExecStart=/usr/bin/freeswitch -nonat -nc -nf | ||
TimeoutSec=45s | ||
Restart=always | ||
IOSchedulingClass=realtime | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=GOfax.IP Fax over IP Bridge | ||
After=network.target local-fs.target | ||
|
||
[Service] | ||
User=uucp | ||
ExecStart=/usr/bin/gofaxd | ||
Restart=always | ||
|
||
[Install] | ||
WantedBy=multi-user.target |