summaryrefslogtreecommitdiff
path: root/packaging/docker-adaptor.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/docker-adaptor.spec')
-rw-r--r--packaging/docker-adaptor.spec60
1 files changed, 60 insertions, 0 deletions
diff --git a/packaging/docker-adaptor.spec b/packaging/docker-adaptor.spec
new file mode 100644
index 0000000..da73be9
--- /dev/null
+++ b/packaging/docker-adaptor.spec
@@ -0,0 +1,60 @@
+Name: docker-adaptor
+Summary: Provide network and system data setting daemon
+Version: 0.7.0
+Release: 0
+Group: System/Docker Framework
+ExclusiveArch: armv7l
+License: Apache-2.0
+Source0: %{name}-%{version}.tar.gz
+Source1: %{name}.manifest
+Source2: %{name}.service
+BuildRequires: awk
+BuildRequires: cmake
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(libsystemd)
+BuildRequires: pkgconfig(json-c)
+
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description
+provide setting for network and system data based on config
+
+%prep
+%setup -q
+cp %{SOURCE1} ./
+cp %{SOURCE2} ./
+
+%build
+export LDFLAGS+="-Wl,--as-needed"
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+
+%cmake . \
+ -DBUILD_TESTS=OFF\
+ -DMAJORVER=${MAJORVER}\
+ -DFULLVER=%{version}\
+ -DBIN_INSTALL_DIR:PATH=%{_bindir}
+
+%install
+%make_install
+mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
+install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/%{name}.service
+%install_service multi-user.target.wants %{name}.service
+
+
+%post
+
+%preun
+
+%postun
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%license LICENSE.Apache-2.0
+%{_bindir}/%{name}
+%{_unitdir}/%{name}.service
+%{_unitdir}/multi-user.target.wants/%{name}.service
+