--- /dev/null
+Name: edge-orchestration
+Version: 0.0.1
+Release: 0
+License: Apache-2.0
+Summary: edge orchestration
+
+ExclusiveArch: armv7l
+Source0: %{name}-%{version}.tar.gz
+Source1: %{name}.manifest
+Source2: %{name}.service
+
+Requires(post): /sbin/ldconfig, /usr/bin/systemctl
+Requires(postun): /sbin/ldconfig, /usr/bin/systemctl
+
+BuildRequires: go
+
+%description
+Technologies for Device/Service management.
+Edge service deployment/monitoring and data sharing in home environment with limited available H/W resources.
+
+%prep
+%setup -q
+
+chmod g-w %_sourcedir/*
+cp %{SOURCE1} ./%{name}.manifest
+cp %{SOURCE2} ./%{name}.services
+
+%build
+ORG_VENDOR_DIR='vendor'
+CUR_VENDOR_DIR='vendor/src'
+mkdir -p ${CUR_VENDOR_DIR}
+ln -s %{_builddir}/%{name}-%{version}/${ORG_VENDOR_DIR} %{_builddir}/%{name}-%{version}/${CUR_VENDOR_DIR}
+
+cd src
+export GOARCH=arm GOARM=7
+export GOROOT=/usr/local/go
+export PATH=$PATH:/usr/local/go/bin/linux_arm
+export GOPATH=%{_builddir}/%{name}-%{version}:%{_builddir}/%{name}-%{version}/vendor
+go build -a -v -ldflags '-extldflags "-static"' -o ../bin/%{name}
+cd ..
+
+%install
+rm -rf %{buildroot}
+install -d $RPM_BUILD_ROOT%{_bindir}
+install -p -m 755 ./bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
+mkdir -p %{buildroot}/usr/lib/systemd/system/multi-user.target.wants
+install -m 0644 %SOURCE2 %{buildroot}/usr/lib/systemd/system/%{name}.service
+ln -s ../%{name}.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{_bindir}/%{name}
+%{_unitdir}/%{name}.service
+%{_unitdir}/multi-user.target.wants/%{name}.service
--- /dev/null
+package main
+
+import (
+ "fmt"
+ "net/http"
+)
+
+func main() {
+ http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) {
+ fmt.Fprintf(w, "Welcome to my website!")
+ })
+
+ fs := http.FileServer(http.Dir("static/"))
+ http.Handle("/static/", http.StripPrefix("/static/", fs))
+
+ http.ListenAndServe(":9090", nil)
+}
+