summaryrefslogtreecommitdiff
path: root/packaging/docker-adaptor.spec
blob: da73be90684200eba2c9450d36f247472475ac35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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