150 changed files with 8297 additions and 7952 deletions
@ -0,0 +1,8 @@ |
|||||||
|
{ |
||||||
|
"smarttabs": true, |
||||||
|
"onecase": true, |
||||||
|
"curly": true, |
||||||
|
"forin": true, |
||||||
|
"trailing": true, |
||||||
|
"asi": true |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
See debian/changelog or https://github.com/strukturag/spreed-webrtc for further information. |
@ -1,174 +0,0 @@ |
|||||||
#
|
|
||||||
# Spreed Speak Freely.
|
|
||||||
# Copyright (C) 2013-2014 struktur AG
|
|
||||||
#
|
|
||||||
# This file is part of Spreed Speak Freely.
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
|
|
||||||
PKG := app/spreed-speakfreely-server |
|
||||||
EXENAME := spreed-speakfreely-server |
|
||||||
CONFIG_FILE ?= spreed-speakfreely-server.conf |
|
||||||
CONFIG_PATH ?= /etc |
|
||||||
|
|
||||||
VENDOR = "$(CURDIR)/vendor" |
|
||||||
GOPATH = "$(VENDOR):$(CURDIR)" |
|
||||||
|
|
||||||
SYSTEM_GOPATH := /usr/share/gocode/src/ |
|
||||||
OUTPUT := $(CURDIR)/bin |
|
||||||
OUTPUT_JS := $(CURDIR)/build/out |
|
||||||
VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p') |
|
||||||
|
|
||||||
DESTDIR ?= / |
|
||||||
BIN := $(DESTDIR)/usr/sbin |
|
||||||
CONF := $(DESTDIR)/$(CONFIG_PATH) |
|
||||||
SHARE := $(DESTDIR)/usr/share/spreed-speakfreely-server |
|
||||||
|
|
||||||
BUILD_ARCH := $(shell go env GOARCH) |
|
||||||
DIST := $(CURDIR)/dist_$(BUILD_ARCH) |
|
||||||
DIST_SRC := $(DIST)/src |
|
||||||
DIST_BIN := $(DIST)/bin |
|
||||||
|
|
||||||
NODEJS_BIN := $(shell which nodejs) |
|
||||||
ifeq ("$(NODEJS_BIN)", "") |
|
||||||
NODEJS_BIN := $(shell which node) |
|
||||||
endif |
|
||||||
NODEJS_BIN_EXISTS := $(shell [ -x "$(NODEJS_BIN)" ] && echo 1 || echo 0) |
|
||||||
ifneq ($(NODEJS_BIN_EXISTS), 1) |
|
||||||
$(error "Can't find node.js runtime, please install / check your PATH") |
|
||||||
endif |
|
||||||
|
|
||||||
# Tools
|
|
||||||
AUTOPREFIXER_BROWSER_SUPPORT := "> 1%, last 2 versions, Firefox ESR, Opera 12.1" |
|
||||||
|
|
||||||
build: get binary assets |
|
||||||
|
|
||||||
gopath: |
|
||||||
@echo GOPATH=$(GOPATH) |
|
||||||
|
|
||||||
get: |
|
||||||
GOPATH=$(GOPATH) go get $(PKG) |
|
||||||
|
|
||||||
getupdate: |
|
||||||
rm -rf vendor/* |
|
||||||
GOPATH=$(GOPATH) go get $(PKG) |
|
||||||
|
|
||||||
binary: |
|
||||||
GOPATH=$(GOPATH) go build -o $(OUTPUT)/$(EXENAME) -ldflags '$(LDFLAGS)' $(PKG) |
|
||||||
|
|
||||||
binaryrace: |
|
||||||
GOPATH=$(GOPATH) go build -race -o $(OUTPUT)/$(EXENAME) -ldflags '$(LDFLAGS)' $(PKG) |
|
||||||
|
|
||||||
binaryall: |
|
||||||
GOPATH=$(GOPATH) go build -a -o $(OUTPUT)/$(EXENAME) -ldflags '$(LDFLAGS)' $(PKG) |
|
||||||
|
|
||||||
fmt: |
|
||||||
GOPATH=$(GOPATH) go fmt app/... |
|
||||||
|
|
||||||
test: TESTDEPS = $(shell GOPATH=$(GOPATH) go list -f '{{.ImportPath}}{{"\n"}}{{join .Deps "\n"}}' $(PKG) |grep $(PKG)) |
|
||||||
test: get |
|
||||||
GOPATH=$(GOPATH) go test -i $(TESTDEPS) |
|
||||||
GOPATH=$(GOPATH) go test -v $(TESTDEPS) |
|
||||||
|
|
||||||
assets: styles javascript |
|
||||||
|
|
||||||
styles: SASSFLAGS = --style=expanded |
|
||||||
styles: |
|
||||||
mkdir -p $(CURDIR)/static/css |
|
||||||
mkdir -p $(CURDIR)/static/fonts |
|
||||||
cp -r $(CURDIR)/src/styles/libs/font-awesome/fonts/font* $(CURDIR)/static/fonts |
|
||||||
sass --compass --scss $(SASSFLAGS) \
|
|
||||||
$(CURDIR)/src/styles/main.scss:$(CURDIR)/static/css/main.min.css |
|
||||||
autoprefixer --browsers $(AUTOPREFIXER_BROWSER_SUPPORT) $(CURDIR)/static/css/main.min.css |
|
||||||
sass --compass --scss $(SASSFLAGS) \
|
|
||||||
$(CURDIR)/src/styles/bootstrap.scss:$(CURDIR)/static/css/bootstrap.min.css |
|
||||||
sass --compass --scss $(SASSFLAGS) \
|
|
||||||
$(CURDIR)/src/styles/font-awesome.scss:$(CURDIR)/static/css/font-awesome.min.css |
|
||||||
|
|
||||||
releaseassets: RJSFLAGS = generateSourceMaps=false preserveLicenseComments=true |
|
||||||
releaseassets: SASSFLAGS = --style=compressed --no-cache |
|
||||||
releaseassets: dist_gopath assets |
|
||||||
|
|
||||||
javascript: |
|
||||||
mkdir -p $(OUTPUT_JS) |
|
||||||
$(NODEJS_BIN) $(CURDIR)/build/r.js \
|
|
||||||
-o $(CURDIR)/build/build.js \
|
|
||||||
dir=$(OUTPUT_JS) $(RJSFLAGS) |
|
||||||
|
|
||||||
release: GOPATH = "$(DIST):$(VENDOR):$(CURDIR)" |
|
||||||
release: LDFLAGS = -X main.version $(VERSION) -X main.defaultConfig $(CONFIG_PATH)/$(CONFIG_FILE) |
|
||||||
release: OUTPUT = $(DIST_BIN) |
|
||||||
release: dist_gopath $(DIST_BIN) binary releaseassets |
|
||||||
|
|
||||||
releasetest: GOPATH = "$(DIST):$(VENDOR):$(CURDIR)" |
|
||||||
releasetest: dist_gopath test |
|
||||||
|
|
||||||
install: |
|
||||||
echo $(BIN) |
|
||||||
echo $(SHARE) |
|
||||||
install -d $(BIN) $(CONF) |
|
||||||
install -d $(SHARE)/www/html |
|
||||||
install -d $(SHARE)/www/static |
|
||||||
install -d $(SHARE)/www/static/img |
|
||||||
install -d $(SHARE)/www/static/sounds |
|
||||||
install -d $(SHARE)/www/static/fonts |
|
||||||
install -d $(SHARE)/www/static/translation |
|
||||||
install -d $(SHARE)/www/static/css |
|
||||||
install $(DIST_BIN)/* $(BIN) |
|
||||||
install -m 644 server.conf.in $(CONF)/$(CONFIG_FILE) |
|
||||||
install html/* $(SHARE)/www/html |
|
||||||
install static/img/* $(SHARE)/www/static/img |
|
||||||
install static/sounds/* $(SHARE)/www/static/sounds |
|
||||||
install static/fonts/* $(SHARE)/www/static/fonts |
|
||||||
install static/translation/* $(SHARE)/www/static/translation |
|
||||||
install static/css/* $(SHARE)/www/static/css |
|
||||||
install -D static/js/libs/require/require.js $(SHARE)/www/static/js/libs/require/require.js |
|
||||||
install $(OUTPUT_JS)/*.js $(SHARE)/www/static/js |
|
||||||
|
|
||||||
clean: |
|
||||||
GOPATH=$(GOPATH) go clean -i $(PKG) |
|
||||||
rm -rf $(CURDIR)/pkg |
|
||||||
rm -rf $(CURDIR)/static/css |
|
||||||
rm -rf $(CURDIR)/static/fonts |
|
||||||
rm -rf $(CURDIR)/build/out |
|
||||||
|
|
||||||
distclean: clean |
|
||||||
rm -rf $(DIST) |
|
||||||
|
|
||||||
pristine: distclean |
|
||||||
rm -f server.conf |
|
||||||
rm -rf vendor/* |
|
||||||
|
|
||||||
$(DIST_SRC): |
|
||||||
mkdir -p $@ |
|
||||||
|
|
||||||
$(DIST_BIN): |
|
||||||
mkdir -p $@ |
|
||||||
|
|
||||||
dist_gopath: $(DIST_SRC) |
|
||||||
find $(SYSTEM_GOPATH) -mindepth 1 -maxdepth 1 -type d \
|
|
||||||
-exec ln -sf {} $(DIST_SRC) \; |
|
||||||
|
|
||||||
tarball: PACKAGE_NAME = $(EXENAME)-$(VERSION) |
|
||||||
tarball: TARPATH = $(DIST)/$(PACKAGE_NAME) |
|
||||||
tarball: BIN = $(TARPATH)/loader |
|
||||||
tarball: CONF = $(TARPATH)/loader |
|
||||||
tarball: DOCS = $(CONF)/docs |
|
||||||
tarball: SHARE = $(TARPATH)/ |
|
||||||
tarball: distclean release install |
|
||||||
echo -n $(VERSION) > $(TARPATH)/version.txt |
|
||||||
tar czf $(DIST)/$(PACKAGE_NAME).tar.gz -C $(DIST) $(PACKAGE_NAME) |
|
||||||
|
|
||||||
.PHONY: clean distclean pristine get getupdate build styles javascript release releasetest dist_gopath install gopath binary binaryrace binaryall tarball assets |
|
@ -0,0 +1,179 @@ |
|||||||
|
#
|
||||||
|
# Spreed WebRTC.
|
||||||
|
# Copyright (C) 2013-2014 struktur AG
|
||||||
|
#
|
||||||
|
# This file is part of Spreed WebRTC.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = -Wno-portability |
||||||
|
|
||||||
|
PKG := app/spreed-webrtc-server |
||||||
|
EXENAME := spreed-webrtc-server |
||||||
|
CONFIG_FILE ?= spreed-webrtc-server.conf |
||||||
|
CONFIG_PATH ?= /etc |
||||||
|
|
||||||
|
VENDOR = "$(CURDIR)/vendor" |
||||||
|
GOPATH = "$(VENDOR):$(CURDIR)" |
||||||
|
|
||||||
|
SYSTEM_GOPATH := /usr/share/gocode/src/ |
||||||
|
OUTPUT := $(CURDIR)/bin |
||||||
|
OUTPUT_JS := $(CURDIR)/build/out |
||||||
|
|
||||||
|
DESTDIR ?= / |
||||||
|
BIN := $(DESTDIR)/usr/sbin |
||||||
|
CONFIG_DIR := $(DESTDIR)/$(CONFIG_PATH) |
||||||
|
SHARE := $(DESTDIR)/usr/share/spreed-webrtc-server |
||||||
|
|
||||||
|
BUILD_ARCH := $(shell $(GO) env GOARCH) |
||||||
|
BUILD_OS := $(shell go env GOOS) |
||||||
|
DIST := $(CURDIR)/dist_$(BUILD_ARCH) |
||||||
|
DIST_SRC := $(DIST)/src |
||||||
|
DIST_BIN := $(DIST)/bin |
||||||
|
|
||||||
|
# Tools
|
||||||
|
AUTOPREFIXER_BROWSER_SUPPORT := "> 1%, last 2 versions, Firefox ESR, Opera 12.1" |
||||||
|
|
||||||
|
all: build |
||||||
|
|
||||||
|
build: get binary assets |
||||||
|
|
||||||
|
gopath: |
||||||
|
@echo GOPATH=$(GOPATH) |
||||||
|
|
||||||
|
get: |
||||||
|
GOPATH=$(GOPATH) $(GO) get $(PKG) |
||||||
|
|
||||||
|
getupdate: |
||||||
|
rm -rf vendor/* |
||||||
|
GOPATH=$(GOPATH) $(GO) get $(PKG) |
||||||
|
|
||||||
|
binary: |
||||||
|
GOPATH=$(GOPATH) $(GO) build -o $(OUTPUT)/$(EXENAME) -ldflags '$(LDFLAGS)' $(PKG) |
||||||
|
|
||||||
|
binaryrace: |
||||||
|
GOPATH=$(GOPATH) $(GO) build -race -o $(OUTPUT)/$(EXENAME) -ldflags '$(LDFLAGS)' $(PKG) |
||||||
|
|
||||||
|
binaryall: |
||||||
|
GOPATH=$(GOPATH) $(GO) build -a -o $(OUTPUT)/$(EXENAME) -ldflags '$(LDFLAGS)' $(PKG) |
||||||
|
|
||||||
|
fmt: |
||||||
|
GOPATH=$(GOPATH) $(GO) fmt app/... |
||||||
|
|
||||||
|
test: TESTDEPS = $(shell GOPATH=$(GOPATH) $(GO) list -f '{{.ImportPath}}{{"\n"}}{{join .Deps "\n"}}' $(PKG) | $(GREP) $(PKG)) |
||||||
|
test: get |
||||||
|
GOPATH=$(GOPATH) $(GO) test -i $(TESTDEPS) |
||||||
|
GOPATH=$(GOPATH) $(GO) test -v $(TESTDEPS) |
||||||
|
|
||||||
|
assets: styles javascript |
||||||
|
|
||||||
|
styles: SASSFLAGS = --style=expanded |
||||||
|
styles: |
||||||
|
$(MKDIR_P) $(CURDIR)/static/css |
||||||
|
$(MKDIR_P) $(CURDIR)/static/fonts |
||||||
|
cp -r $(CURDIR)/src/styles/libs/font-awesome/fonts/font* $(CURDIR)/static/fonts |
||||||
|
$(SASS) --compass --scss $(SASSFLAGS) \
|
||||||
|
$(CURDIR)/src/styles/main.scss:$(CURDIR)/static/css/main.min.css |
||||||
|
$(AUTOPREFIXER) --browsers $(AUTOPREFIXER_BROWSER_SUPPORT) $(CURDIR)/static/css/main.min.css |
||||||
|
$(SASS) --compass --scss $(SASSFLAGS) \
|
||||||
|
$(CURDIR)/src/styles/bootstrap.scss:$(CURDIR)/static/css/bootstrap.min.css |
||||||
|
$(SASS) --compass --scss $(SASSFLAGS) \
|
||||||
|
$(CURDIR)/src/styles/font-awesome.scss:$(CURDIR)/static/css/font-awesome.min.css |
||||||
|
|
||||||
|
styleshint: |
||||||
|
$(FIND) src/styles -maxdepth 1 -name "*.scss" -print0 | xargs -0 -n1 $(SASS) --compass --scss $(SASSFLAGS) -c |
||||||
|
|
||||||
|
releaseassets: RJSFLAGS = generateSourceMaps=false preserveLicenseComments=true |
||||||
|
releaseassets: SASSFLAGS = --style=compressed --no-cache |
||||||
|
releaseassets: dist_gopath assets |
||||||
|
|
||||||
|
javascript: |
||||||
|
$(MKDIR_P) $(OUTPUT_JS) |
||||||
|
$(NODEJS) $(CURDIR)/build/r.js \
|
||||||
|
-o $(CURDIR)/build/build.js \
|
||||||
|
dir=$(OUTPUT_JS) $(RJSFLAGS) |
||||||
|
|
||||||
|
jshint: |
||||||
|
@if [ "$(JSHINT)" = "" ]; then echo "Command 'jshint' not found"; exit 1; fi |
||||||
|
$(FIND) static/ -wholename static/js/libs -prune -o -name "*.js" -print0 | xargs -0 -n1 $(JSHINT) --config .jshint |
||||||
|
|
||||||
|
jsbeautify: |
||||||
|
@if [ "$(JS_BEAUTIFY)" = "" ]; then echo "Command 'js-beautify' not found"; exit 1; fi |
||||||
|
$(FIND) static/ \( -path static/js/libs -o -path static/translation \) -prune -o -name "*.js" -exec $(JS_BEAUTIFY) -t -o {}.new {} \; -exec mv -f {}.new {} \; |
||||||
|
|
||||||
|
release: GOPATH = "$(DIST):$(VENDOR):$(CURDIR)" |
||||||
|
release: LDFLAGS = -X main.version $(PACKAGE_VERSION) -X main.defaultConfig $(CONFIG_PATH)/$(CONFIG_FILE) |
||||||
|
release: OUTPUT = $(DIST_BIN) |
||||||
|
release: dist_gopath $(DIST_BIN) binary releaseassets |
||||||
|
|
||||||
|
releasetest: GOPATH = "$(DIST):$(VENDOR):$(CURDIR)" |
||||||
|
releasetest: dist_gopath test |
||||||
|
|
||||||
|
install: |
||||||
|
echo $(BIN) |
||||||
|
echo $(SHARE) |
||||||
|
$(INSTALL) -d $(BIN) $(CONF) |
||||||
|
$(INSTALL) -d $(SHARE)/www/html |
||||||
|
$(INSTALL) -d $(SHARE)/www/static |
||||||
|
$(INSTALL) -d $(SHARE)/www/static/img |
||||||
|
$(INSTALL) -d $(SHARE)/www/static/sounds |
||||||
|
$(INSTALL) -d $(SHARE)/www/static/fonts |
||||||
|
$(INSTALL) -d $(SHARE)/www/static/translation |
||||||
|
$(INSTALL) -d $(SHARE)/www/static/css |
||||||
|
$(INSTALL) $(DIST_BIN)/* $(BIN) |
||||||
|
$(INSTALL) -m 644 server.conf.in $(CONF)/$(CONFIG_FILE) |
||||||
|
$(INSTALL) html/* $(SHARE)/www/html |
||||||
|
$(INSTALL) static/img/* $(SHARE)/www/static/img |
||||||
|
$(INSTALL) static/sounds/* $(SHARE)/www/static/sounds |
||||||
|
$(INSTALL) static/fonts/* $(SHARE)/www/static/fonts |
||||||
|
$(INSTALL) static/translation/* $(SHARE)/www/static/translation |
||||||
|
$(INSTALL) static/css/* $(SHARE)/www/static/css |
||||||
|
$(INSTALL) -D static/js/libs/require/require.js $(SHARE)/www/static/js/libs/require/require.js |
||||||
|
$(INSTALL) $(OUTPUT_JS)/*.js $(SHARE)/www/static/js |
||||||
|
|
||||||
|
clean: |
||||||
|
GOPATH=$(GOPATH) $(GO) clean -i $(PKG) |
||||||
|
rm -rf $(CURDIR)/pkg |
||||||
|
rm -rf $(CURDIR)/static/css |
||||||
|
rm -rf $(CURDIR)/static/fonts |
||||||
|
rm -rf $(CURDIR)/build/out |
||||||
|
|
||||||
|
distclean: clean |
||||||
|
rm -rf $(DIST) |
||||||
|
|
||||||
|
pristine: distclean |
||||||
|
rm -f server.conf |
||||||
|
rm -rf vendor/* |
||||||
|
|
||||||
|
$(DIST_SRC): |
||||||
|
$(MKDIR_P) $@ |
||||||
|
|
||||||
|
$(DIST_BIN): |
||||||
|
$(MKDIR_P) $@ |
||||||
|
|
||||||
|
dist_gopath: $(DIST_SRC) |
||||||
|
$(FIND) $(SYSTEM_GOPATH) -mindepth 1 -maxdepth 1 -type d \
|
||||||
|
-exec ln -sf {} $(DIST_SRC) \; |
||||||
|
|
||||||
|
tarball: TARPATH = $(DIST)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) |
||||||
|
tarball: BIN = $(TARPATH)/loader |
||||||
|
tarball: CONF = $(TARPATH)/loader |
||||||
|
tarball: DOCS = $(CONF)/docs |
||||||
|
tarball: SHARE = $(TARPATH)/ |
||||||
|
tarball: distclean release install |
||||||
|
echo -n $(PACKAGE_VERSION) > $(TARPATH)/version.txt |
||||||
|
tar czf $(DIST)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)_$(BUILD_OS)_$(BUILD_ARCH).tar.gz -C $(DIST) $(PACKAGE_NAME)-$(PACKAGE_VERSION) |
||||||
|
|
||||||
|
.PHONY: clean distclean pristine get getupdate build styles javascript release releasetest dist_gopath install gopath binary binaryrace binaryall tarball assets |
@ -0,0 +1 @@ |
|||||||
|
See https://github.com/strukturag/spreed-webrtc for further information. |
@ -0,0 +1,22 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
# the pre-commit hook performs various formatting checks |
||||||
|
if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \); then \ |
||||||
|
rm -f .git/hooks/pre-commit; \ |
||||||
|
ln -s ../../src/hooks/pre-commit.hook .git/hooks/pre-commit; \ |
||||||
|
fi |
||||||
|
|
||||||
|
if [ -x "`which autoreconf 2>/dev/null`" ] ; then |
||||||
|
exec autoreconf -ivf |
||||||
|
fi |
||||||
|
|
||||||
|
LIBTOOLIZE=libtoolize |
||||||
|
SYSNAME=`uname` |
||||||
|
if [ "x$SYSNAME" = "xDarwin" ] ; then |
||||||
|
LIBTOOLIZE=glibtoolize |
||||||
|
fi |
||||||
|
aclocal -I m4 && \ |
||||||
|
autoheader && \ |
||||||
|
$LIBTOOLIZE && \ |
||||||
|
autoconf && \ |
||||||
|
automake --add-missing --force-missing --copy |
@ -0,0 +1,110 @@ |
|||||||
|
# |
||||||
|
# Spreed WebRTC. |
||||||
|
# Copyright (C) 2013-2014 struktur AG |
||||||
|
# |
||||||
|
# This file is part of Spreed WebRTC. |
||||||
|
# |
||||||
|
# This program is free software: you can redistribute it and/or modify |
||||||
|
# it under the terms of the GNU Affero General Public License as published by |
||||||
|
# the Free Software Foundation, either version 3 of the License, or |
||||||
|
# (at your option) any later version. |
||||||
|
# |
||||||
|
# This program is distributed in the hope that it will be useful, |
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
# GNU Affero General Public License for more details. |
||||||
|
# |
||||||
|
# You should have received a copy of the GNU Affero General Public License |
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||||
|
# |
||||||
|
|
||||||
|
dnl required version of autoconf |
||||||
|
AC_PREREQ([2.53]) |
||||||
|
|
||||||
|
AC_INIT([spreed-webrtc],[unknown],[opensource@struktur.de],[],[https://github.com/strukturag/spreed-webrtc]) |
||||||
|
|
||||||
|
# minimum required versions (actually one version before) |
||||||
|
GO_VERSION_MIN=1.0.9 # actually 1.1 |
||||||
|
NODEJS_VERSION_MIN=0.7.9 # actually 0.8.0 |
||||||
|
SASS_VERSION_MIN=3.1.9 # actually 3.2.0 |
||||||
|
|
||||||
|
AC_CONFIG_SRCDIR([src/app/spreed-webrtc-server/main.go]) |
||||||
|
AC_CONFIG_HEADERS([config.h]) |
||||||
|
|
||||||
|
dnl required version of automake |
||||||
|
AM_INIT_AUTOMAKE([1.10]) |
||||||
|
|
||||||
|
dnl enable mainainer mode by default |
||||||
|
AM_MAINTAINER_MODE([enable]) |
||||||
|
|
||||||
|
AC_PROG_MKDIR_P |
||||||
|
AC_PROG_INSTALL |
||||||
|
AC_PROG_GREP |
||||||
|
AC_PROG_SED |
||||||
|
|
||||||
|
AC_SUBST(MKDIR_P) |
||||||
|
AC_SUBST(INSTALL) |
||||||
|
AC_SUBST(GREP) |
||||||
|
AC_SUBST(SED) |
||||||
|
|
||||||
|
AC_PATH_PROGS([FIND],[find]) |
||||||
|
AC_PATH_PROGS([JSHINT],[jshint]) |
||||||
|
AC_PATH_PROGS([JS_BEAUTIFY],[js-beautify]) |
||||||
|
|
||||||
|
AC_SUBST(FIND) |
||||||
|
AC_SUBST(JSHINT) |
||||||
|
AC_SUBST(JS_BEAUTIFY) |
||||||
|
|
||||||
|
AC_PATH_PROGS([GO],[go]) |
||||||
|
if test x"${GO}" == x"" ; then |
||||||
|
AC_MSG_ERROR([Please install Go before trying to build spreed-webrtc.]) |
||||||
|
fi |
||||||
|
GO_VERSION=`$GO version | sed 's/^go version go//' | $SED 's/ .*//'` |
||||||
|
if test "$GO_VERSION" == "`echo -e "$GO_VERSION\n$GO_VERSION_MIN" | sort -V | head -n1`" ; then |
||||||
|
AC_MSG_ERROR([Please install Go $GO_VERSION_MIN or newer before trying to build spreed-webrtc (found Go $GO_VERSION).]) |
||||||
|
fi |
||||||
|
AC_SUBST(GO) |
||||||
|
|
||||||
|
AC_PATH_PROGS([NODEJS],[nodejs node]) |
||||||
|
if test x"${NODEJS}" == x"" ; then |
||||||
|
AC_MSG_ERROR([Please install node.js before trying to build spreed-webrtc.]) |
||||||
|
fi |
||||||
|
NODEJS_VERSION=`$NODEJS --version | $SED 's/^v//'` |
||||||
|
if test "$NODEJS_VERSION" == "`echo -e "$NODEJS_VERSION\n$NODEJS_VERSION_MIN" | sort -V | head -n1`" ; then |
||||||
|
AC_MSG_ERROR([Please install node.js $NODEJS_VERSION_MIN or newer before trying to build spreed-webrtc (found node.js $NODEJS_VERSION).]) |
||||||
|
fi |
||||||
|
AC_SUBST(NODEJS) |
||||||
|
|
||||||
|
AC_PATH_PROGS([SASS],[sass]) |
||||||
|
if test x"${SASS}" == x"" ; then |
||||||
|
AC_MSG_ERROR([Please install sass before trying to build spreed-webrtc.]) |
||||||
|
fi |
||||||
|
SASS_VERSION=`$SASS --version | $SED 's/^Sass //' | $SED 's/ .*//'` |
||||||
|
if test "$SASS_VERSION" == "`echo -e "$SASS_VERSION\n$SASS_VERSION_MIN" | sort -V | head -n1`" ; then |
||||||
|
AC_MSG_ERROR([Please install sass $SASS_VERSION_MIN or newer before trying to build spreed-webrtc (found sass $SASS_VERSION).]) |
||||||
|
fi |
||||||
|
AC_SUBST(SASS) |
||||||
|
|
||||||
|
AC_PATH_PROGS([COMPASS],[compass]) |
||||||
|
if test x"${COMPASS}" == x"" ; then |
||||||
|
AC_MSG_ERROR([Please install compass before trying to build spreed-webrtc.]) |
||||||
|
fi |
||||||
|
AC_SUBST(COMPASS) |
||||||
|
|
||||||
|
AC_PATH_PROGS([AUTOPREFIXER],[autoprefixer]) |
||||||
|
if test x"${AUTOPREFIXER}" == x"" ; then |
||||||
|
AC_MSG_ERROR([Please install autoprefixer before trying to build spreed-webrtc.]) |
||||||
|
fi |
||||||
|
AC_SUBST(AUTOPREFIXER) |
||||||
|
|
||||||
|
VERSION=`dpkg-parsechangelog | sed -n 's/^Version: //p'` |
||||||
|
PACKAGE_VERSION="$VERSION" |
||||||
|
PACKAGE_STRING="$PACKAGE_NAME $PACKAGE_VERSION" |
||||||
|
AC_DEFINE_UNQUOTED(VERSION, ["$VERSION"], [Version number of package]) |
||||||
|
AC_DEFINE_UNQUOTED(PACKAGE_VERSION, ["$PACKAGE_VERSION"], [Define to the version of this package.]) |
||||||
|
AC_DEFINE_UNQUOTED(PACKAGE_STRING, ["$PACKAGE_STRING"], [Define to the full name and version of this package.]) |
||||||
|
|
||||||
|
AC_CONFIG_FILES([ |
||||||
|
Makefile |
||||||
|
]) |
||||||
|
AC_OUTPUT |
@ -0,0 +1,32 @@ |
|||||||
|
Linux: |
||||||
|
|
||||||
|
Target linux/amd64 |
||||||
|
GOOS=linux GOARCH=amd64 make tarball |
||||||
|
|
||||||
|
Target linux/386: |
||||||
|
GOOS=linux GOARCH=386 make tarball |
||||||
|
|
||||||
|
Target linux/armv5 |
||||||
|
GOOS=linux GOARCH=arm GOARM=5 make tarball |
||||||
|
|
||||||
|
Target linux/armv6 |
||||||
|
GOOS=linux GOARCH=arm GOARM=6 make tarball |
||||||
|
|
||||||
|
Target linux/armv7 |
||||||
|
GOOS=linux GOARCH=arm GOARM=7 make tarball |
||||||
|
|
||||||
|
|
||||||
|
Mac: |
||||||
|
|
||||||
|
Target darwin/amd64 |
||||||
|
GOOS=darwin GOARCH=amd64 make tarball |
||||||
|
|
||||||
|
|
||||||
|
Windows: |
||||||
|
|
||||||
|
Target windows/386 |
||||||
|
GOOS=windows GOARCH=386 make tarball |
||||||
|
|
||||||
|
Target windows/amd64 |
||||||
|
GOOS=windows GOARCH=amd64 make tarball |
||||||
|
|
@ -0,0 +1,10 @@ |
|||||||
|
<%define "crawlerPage"%><!doctype html> |
||||||
|
<html> |
||||||
|
<head> |
||||||
|
<meta property="og:title" content="/<%.Room%>" /> |
||||||
|
<meta property="og:site_name" content="<%.Cfg.Title%>"/> |
||||||
|
<meta property="og:image" content="<%.Scheme%>://<%.Host%><%.Cfg.B%>static/img/opengraph-image.png" /> |
||||||
|
<meta property="og:type" content="article" /> |
||||||
|
</head> |
||||||
|
<body></body> |
||||||
|
</html><%end%> |
@ -1 +1 @@ |
|||||||
<%define "logo"%><span class="logo" title="<%.Cfg.Title%>"><span><a target="_blank" href="https://github.com/strukturag/spreed-speakfreely">Speak Freely</a></span></span><%end%> |
<%define "logo"%><span class="logo" title="<%.Cfg.Title%>"><span><a target="_blank" href="https://github.com/strukturag/spreed-webrtc">WebRTC</a></span></span><%end%> |
@ -1,2 +0,0 @@ |
|||||||
#!/bin/bash |
|
||||||
exec ./bin/spreed-speakfreely-server $* |
|
@ -0,0 +1,2 @@ |
|||||||
|
#!/bin/bash |
||||||
|
exec ./bin/spreed-webrtc-server $* |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
@ -1,8 +1,8 @@ |
|||||||
/* |
/* |
||||||
* Spreed Speak Freely. |
* Spreed WebRTC. |
||||||
* Copyright (C) 2013-2014 struktur AG |
* Copyright (C) 2013-2014 struktur AG |
||||||
* |
* |
||||||
* This file is part of Spreed Speak Freely. |
* This file is part of Spreed WebRTC. |
||||||
* |
* |
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU Affero General Public License as published by |
* it under the terms of the GNU Affero General Public License as published by |
Before Width: | Height: | Size: 4.4 KiB |
@ -0,0 +1,73 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# |
||||||
|
# Check that Go files have been formatted |
||||||
|
# |
||||||
|
|
||||||
|
for file in `git diff-index --cached --name-only HEAD --diff-filter=ACMR| grep "\.go$"` ; do |
||||||
|
# nf is the temporary checkout. This makes sure we check against the |
||||||
|
# revision in the index (and not the checked out version). |
||||||
|
nf=`git checkout-index --temp ${file} | cut -f 1` |
||||||
|
newfile=`mktemp /tmp/${nf}.XXXXXX` || exit 1 |
||||||
|
gofmt ${nf} > "${newfile}" 2>> /dev/null |
||||||
|
diff -u -p "${nf}" "${newfile}" |
||||||
|
r=$? |
||||||
|
rm "${newfile}" |
||||||
|
rm "${nf}" |
||||||
|
if [ $r != 0 ] ; then |
||||||
|
echo "=================================================================================================" |
||||||
|
echo " Code format error in: $file " |
||||||
|
echo " " |
||||||
|
echo " Please fix before committing. Don't forget to run git add before trying to commit again. " |
||||||
|
echo " If the whole file is to be committed, this should work (run from the top-level directory): " |
||||||
|
echo " " |
||||||
|
echo " go fmt $file; git add $file; git commit" |
||||||
|
echo " " |
||||||
|
echo "=================================================================================================" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
done |
||||||
|
|
||||||
|
|
||||||
|
for file in `git diff-index --cached --name-only HEAD --diff-filter=ACMR| grep "\.js$"` ; do |
||||||
|
case "$file" in |
||||||
|
*/libs/*) |
||||||
|
echo "Not checking library ${file}" |
||||||
|
;; |
||||||
|
*) |
||||||
|
echo "Checking ${file}" |
||||||
|
nf=`git checkout-index --temp ${file} | cut -f 1` |
||||||
|
jshint --config .jshint "${nf}" |
||||||
|
r=$? |
||||||
|
rm "${nf}" |
||||||
|
if [ $r != 0 ] ; then |
||||||
|
echo "=================================================================================================" |
||||||
|
echo " Code format error in: $file " |
||||||
|
echo " " |
||||||
|
echo " Please fix before committing. Don't forget to run git add before trying to commit again. " |
||||||
|
echo " " |
||||||
|
echo "=================================================================================================" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
;; |
||||||
|
esac |
||||||
|
done |
||||||
|
|
||||||
|
|
||||||
|
check_styles=0 |
||||||
|
for file in `git diff-index --cached --name-only HEAD --diff-filter=ACMR| grep "\.scss$"` ; do |
||||||
|
check_styles=1 |
||||||
|
done |
||||||
|
|
||||||
|
if [ "${check_styles}" = "1" ]; then |
||||||
|
make styleshint |
||||||
|
r=$? |
||||||
|
if [ $r != 0 ] ; then |
||||||
|
echo "=================================================================================================" |
||||||
|
echo " Error in styles " |
||||||
|
echo " " |
||||||
|
echo " Please fix before committing. Don't forget to run git add before trying to commit again. " |
||||||
|
echo " " |
||||||
|
echo "=================================================================================================" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
fi |
After Width: | Height: | Size: 30 KiB |
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue