Index: debian/changelog
===================================================================
--- debian/changelog	(revision e6c9e700392781848df23a73d352b9270156a8f1)
+++ debian/changelog	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -1,2 +1,8 @@
+gnuboat (0.1.1) jessie; urgency=low
+
+  * Packages are now build architecture independend
+
+ -- EngSaS - Joachim Langenbach <info@engsas.de>  Tue, 23 Aug 2016 07:15:00 +0000
+
 gnuboat (0.1) unstable; urgency=low
 
Index: debian/rules
===================================================================
--- debian/rules	(revision e6c9e700392781848df23a73d352b9270156a8f1)
+++ debian/rules	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -6,5 +6,5 @@
 	dh $@ --with systemd,python2,python3
 
-override_dh_auto_build:
+override_dh_auto_build-indep:
 	dh_auto_build
 	phing -Dbuilddir=$(DESTDIR) -f $(CURDIR)/src/webapp/build.xml
Index: src/puppetcode/environments/test/hieradata/common.yaml
===================================================================
--- src/puppetcode/environments/test/hieradata/common.yaml	(revision e6c9e700392781848df23a73d352b9270156a8f1)
+++ src/puppetcode/environments/test/hieradata/common.yaml	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -5,7 +5,8 @@
   - gnuboat_gpsd
   - gnuboat_gnuboat
+  - gnuboat_hostapd
 
-gnuboat_lighttpd::status: 'running'
-gnuboat_lighttpd::enabled: true
+gnuboat_lighttpd::servuce::status: 'running'
+gnuboat_lighttpd::service::enabled: true
 gnuboat_epd::service::status: 'running'
 gnuboat_epd::service::enabled: true
@@ -17,2 +18,8 @@
 gnuboat_gpsd::service::enabled: true
 gnuboat_gpsd::service::devices: '/dev/ttyACM0'
+gnuboat_gnuboat::service::status: 'running'
+gnuboat_gnuboat::service::enabled: true
+gnuboat_gnuboat::server: true
+gnuboat_gnuboat::webclient: true
+gnuboat_hostapd::config::interface: 'wlan0'
+gnuboat_hostapd::config::country_code: 'de'
Index: src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/config.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/config.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/config.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,18 @@
+class gnuboat_gnuboat::config
+(
+	String $document_root = '/usr/share/gnuboat',
+)
+inherits gnuboat_gnuboat
+{
+	file{'/etc/lighttpd':
+		ensure => 'present',
+		owner => 'root',
+		group => 'root',
+		mode => '0600',
+		content => epp('gnuboat_gnuboat/lighttpd.conf.epp',
+			{
+				'document_root' => $document_root,
+			}
+		),
+	}
+}
Index: src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/init.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/init.pp	(revision e6c9e700392781848df23a73d352b9270156a8f1)
+++ src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/init.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -1,10 +1,14 @@
-class gnuboat_gnuboat()
+class gnuboat_gnuboat
+(
+	Boolean $server = true,
+	Boolean $webclient = true,
+)
 {
-        contain gnuboat_gnuboat::install
-#        contain gnuboat_lighttpd::config
- #       contain gnuboat_lighttpd::service
+	contain gnuboat_gnuboat::install
+	contain gnuboat_gnuboat::config
+	contain gnuboat_gnuboat::service
 
-#        Class['gnuboat_gnuboat::install']
-  #      Class['gnuboat_lighttpd::config'] ->
-   #     Class['gnuboat_lighttpd::service']
+	Class['gnuboat_gnuboat::install'] ->
+	Class['gnuboat_gnuboat::config'] ->
+	Class['gnuboat_gnuboat::service']
 }
Index: src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/install.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/install.pp	(revision e6c9e700392781848df23a73d352b9270156a8f1)
+++ src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/install.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -1,7 +1,31 @@
 class gnuboat_gnuboat::install() inherits gnuboat_gnuboat
 {
-	package{'php5-rrd':
-                ensure => $version,
-                notify => Service['lighttpd'],
-        }
+	include apt
+
+#        apt::source{'gnuboatapt':
+#                comment => 'This is the raspbian repository for GNUBoat',
+#                location => 'http://ftp.engsas.de/unstable/gnuboat/',
+#                release => 'jessie',
+#                repos => 'main',
+#                pin => '-10',
+#                include => {
+#                        'src' => true,
+#                        'deb' => true,
+#                },
+#        }
+
+	if $server {
+	        package{'gnuboat-server':
+        	        ensure => $version,
+                	notify => Service['gnuboat'],
+	                require => Apt::Source['gnuboatapt'],
+        	}
+	}
+
+	if $webclient {
+		package{'gnuboat-webclient':
+        	        ensure => $version,
+                	require => Apt::Source['gnuboatapt'],
+	        }
+	}
 }
Index: src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/service.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/service.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/service.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,15 @@
+class gnuboat_gnuboat::service
+(
+	Enum['running', 'stopped'] $status = 'running',
+	Boolean $enabled = true,
+)
+inherits gnuboat_gnuboat
+{
+	if $server {
+		service{'gnuboat':
+			ensure => $status,
+			enable => $enabled,
+			subscribe => Package['gnuboat-server'],
+		}
+	}
+}
Index: src/puppetcode/environments/test/modules/gnuboat_gnuboat/templates/lighttpd.conf.epp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_gnuboat/templates/lighttpd.conf.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_gnuboat/templates/lighttpd.conf.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,28 @@
+server.modules = (
+	"mod_access",
+	"mod_alias",
+	"mod_compress",
+ 	"mod_redirect",
+#       "mod_rewrite",
+)
+
+server.document-root        = "<%= document_root %>"
+server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
+server.errorlog             = "/var/log/lighttpd/error.log"
+server.pid-file             = "/var/run/lighttpd.pid"
+server.username             = "www-data"
+server.groupname            = "www-data"
+server.port                 = 80
+
+
+index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
+url.access-deny             = ( "~", ".inc" )
+static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
+
+compress.cache-dir          = "/var/cache/lighttpd/compress/"
+compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )
+
+# default listening port for IPv6 falls back to the IPv4 port
+include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
+include_shell "/usr/share/lighttpd/create-mime.assign.pl"
+include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/files/default
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/files/default	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/files/default	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,20 @@
+# Defaults for hostapd initscript
+#
+# See /usr/share/doc/hostapd/README.Debian for information about alternative
+# methods of managing hostapd.
+#
+# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
+# file and hostapd will be started during system boot. An example configuration
+# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
+#
+DAEMON_CONF="/etc/hostapd/hostapd.conf"
+
+# Additional daemon options to be appended to hostapd command:-
+# 	-d   show more debug messages (-dd for even more)
+# 	-K   include key data in debug messages
+# 	-t   include timestamps in some debug messages
+#
+# Note that -B (daemon mode) and -P (pidfile) options are automatically
+# configured by the init.d script and must not be added to DAEMON_OPTS.
+#
+#DAEMON_OPTS=""
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/config.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/config.pp	(revision e6c9e700392781848df23a73d352b9270156a8f1)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/config.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -1,5 +1,6 @@
-class config
+class gnuboat_hostapd::config
 (
-	String $interface = 'wlan0',
+	String $interface,
+	String $netmask = '255.255.255.0',
 	String $hw_mode = 'g',
 	Integer $channel = 0,
@@ -9,19 +10,19 @@
 	Boolean $ieee80211ac = false,
 	Boolean $wmm_enabled = false,
-	String $ssid = 'GNU Boat',
+	String $ssid = 'GNUBoat',
 	Enum['1', '2', '3'] $auth_algs = '1',
-	Integer $wpa = '2',
+	Integer $wpa = 2,
 	String $wpa_key_mgmt = 'WPA-PSK',
 	String $rsn_pairwise = 'CCMP',
-	String $wpa_passphrase = 'GNUBoat',
+	String $wpa_passphrase = 'gnu.boat',
 )
-inherits hostapd
+inherits gnuboat_hostapd
 {
-	file{'/etc/hostapd/hostapd.conf',
+	file{'/etc/hostapd/hostapd.conf':
 		ensure => present,
 		owner => 'root',
 		group => 'root',
 		mode => '0600',
-		content => epp('puppet:///hostapd/hostapd.conf.epp',
+		content => epp('gnuboat_hostapd/hostapd.conf.epp',
 			{
 				'interface' => $interface,
@@ -42,3 +43,26 @@
 		),
 	}
+
+	file{'/etc/network/interfaces.d/hostapd':
+		ensure => present,
+		owner => 'root',
+		group => 'root',
+		mode => '0600',
+		content => epp('gnuboat_hostapd/hostapd.interface.epp',
+			{
+				'interface' => $interface,
+				'hostip' => $hostip,
+				'netmask' => $netmask
+			}
+		),
+	}
+
+	file{'/etc/default/hostapd':
+		ensure => present,
+                owner => 'root',
+                group => 'root',
+                mode => '0600',
+                content => file('gnuboat_hostapd/default'),
+	}
+
 }
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/dnsmasq_config.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/dnsmasq_config.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/dnsmasq_config.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,36 @@
+class gnuboat_hostapd::dnsmasq_config
+(
+	String $hostname = 'gnu',
+	String $domain = 'boat',
+	String $dhcp_range = '192.168.254.2,192.168.254.254,12h',
+)
+inherits gnuboat_hostapd
+{
+	file{'/etc/hosts':
+		ensure => present,
+		owner => 'root',
+		group => 'root',
+		mode => '0644',
+		content => epp('gnuboat_hostapd/hosts.epp',
+			{
+				'hostip' => $hostip,
+				'hostname' => $hostname,
+				'domain' => $domain,
+			}
+		),
+	}
+
+
+	file{'/etc/dnsmasq.conf':
+		ensure => present,
+		owner => 'root',
+		group => 'root',
+		mode => '0600',
+		content => epp('gnuboat_hostapd/dnsmasq.conf.epp',
+			{
+				'hostip' => $hostip,
+				'dhcp_range' => $dhcp_range,
+			}
+		),
+	}
+}
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/dnsmasq_install.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/dnsmasq_install.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/dnsmasq_install.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,7 @@
+class gnuboat_hostapd::dnsmasq_install() inherits gnuboat_hostapd
+{
+	package{'dnsmasq':
+		ensure => $version,
+		notify => Service['dnsmasq'],
+	}
+}
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/dnsmasq_service.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/dnsmasq_service.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/dnsmasq_service.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,13 @@
+class gnuboat_hostapd::dnsmasq_service
+(
+	Enum['running', 'stopped'] $status = 'running',
+	Boolean $enabled = true,
+)
+inherits gnuboat_hostapd
+{
+	service{'dnsmasq':
+		ensure => $status,
+		enable => $enabled,
+		subscribe => Package['dnsmasq'],
+	}
+}
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/init.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/init.pp	(revision e6c9e700392781848df23a73d352b9270156a8f1)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/init.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -1,7 +1,28 @@
-class hostapd
+class gnuboat_hostapd
 (
 	String $version = 'latest',
+	String $hostip = '192.168.254.1',
+	String $hostname = 'gnu',
+	String $domain = 'boat',
+	Boolean $dnsmasq_enable = true,
 )
 {
+	contain gnuboat_hostapd::install
+	contain gnuboat_hostapd::service
+	contain gnuboat_hostapd::config
 
+	Class['gnuboat_hostapd::install'] ->
+	Class['gnuboat_hostapd::config'] ->
+	Class['gnuboat_hostapd::service']
+
+
+	if $dnsmasq_enable {
+		contain gnuboat_hostapd::dnsmasq_install
+		contain gnuboat_hostapd::dnsmasq_service
+		contain gnuboat_hostapd::dnsmasq_config
+
+		Class['gnuboat_hostapd::dnsmasq_install'] ->
+		Class['gnuboat_hostapd::dnsmasq_config'] ->
+		Class['gnuboat_hostapd::dnsmasq_service']
+	}
 }
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/install.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/install.pp	(revision e6c9e700392781848df23a73d352b9270156a8f1)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/install.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -1,3 +1,3 @@
-class hostapd::install() inherits hostapd
+class gnuboat_hostapd::install() inherits gnuboat_hostapd
 {
 	package{'hostapd':
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/service.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/service.pp	(revision e6c9e700392781848df23a73d352b9270156a8f1)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/service.pp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -1,8 +1,8 @@
-class hostapd::service
+class gnuboat_hostapd::service
 (
 	Enum['running', 'stopped'] $status = 'running',
 	Boolean $enabled = true,
 )
-inherits hostapd
+inherits gnuboat_hostapd
 {
 	service{'hostapd':
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/default.epp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/default.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/default.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,20 @@
+# Defaults for hostapd initscript
+#
+# See /usr/share/doc/hostapd/README.Debian for information about alternative
+# methods of managing hostapd.
+#
+# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
+# file and hostapd will be started during system boot. An example configuration
+# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
+#
+DAEMON_CONF="/etc/hostapd/hostapd.conf"
+
+# Additional daemon options to be appended to hostapd command:-
+# 	-d   show more debug messages (-dd for even more)
+# 	-K   include key data in debug messages
+# 	-t   include timestamps in some debug messages
+#
+# Note that -B (daemon mode) and -P (pidfile) options are automatically
+# configured by the init.d script and must not be added to DAEMON_OPTS.
+#
+#DAEMON_OPTS=""
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/dnsmasq.conf.epp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/dnsmasq.conf.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/dnsmasq.conf.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,11 @@
+listen-address=127.0.0.1,<%= $hostip %>
+# redirect all dns names to localhost
+# (currently deactivated, because dnsmasq changes /etc/resolv.conf to 127.0.0.1 on localhost,
+#  if all requests are relocated, this pc can not reach any host!)
+# address=/#/<%= $hostip %>
+dhcp-range=<%= $dhcp_range %>
+#gateway
+dhcp-option=3,<%= $hostip %>
+dhcp-option=6,<%= $hostip %>
+domain=boat
+expand-hosts
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/hostapd.conf.epp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/hostapd.conf.epp	(revision e6c9e700392781848df23a73d352b9270156a8f1)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/hostapd.conf.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -6,9 +6,9 @@
 ieee80211n=<%= $ieee80211n %>
 ieee80211ac=<%= $ieee80211ac %>
-<% if wmm_enabled %>
-	wmm_enabled=1
-<% else %>
-	wmm_enabled=0
-<% end %>
+<% if wmm_enabled { -%>
+wmm_enabled=1
+<% } else { -%>
+wmm_enabled=0
+<% } -%>
 ssid=<%= $ssid %>
 auth_algs=<%= $auth_algs %>
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/hostapd.interface.epp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/hostapd.interface.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/hostapd.interface.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,4 @@
+auto <%= $interface %>
+iface <%= $interface %> inet static
+  address <%= $hostip %>
+  netmask <%= $netmask %>
Index: src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/hosts.epp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/hosts.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
+++ src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/hosts.epp	(revision 53f013067610cb6a31bf07ec9e2c0d859f3d6549)
@@ -0,0 +1,7 @@
+127.0.0.1	localhost
+127.0.0.1	<%= $hostname %>
+::1		localhost ip6-localhost ip6-loopback
+ff02::1		ip6-allnodes
+ff02::2		ip6-allrouters
+
+<%= $hostip %>	<%= $hostname %>.<%= $domain %> <%= $hostname %>
