summaryrefslogtreecommitdiff
path: root/packaging/connectedhomeip.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/connectedhomeip.spec')
-rwxr-xr-xpackaging/connectedhomeip.spec49
1 files changed, 43 insertions, 6 deletions
diff --git a/packaging/connectedhomeip.spec b/packaging/connectedhomeip.spec
index c7b7f57e..219ac1e2 100755
--- a/packaging/connectedhomeip.spec
+++ b/packaging/connectedhomeip.spec
@@ -6,6 +6,7 @@ Group: Network & Connectivity/Other
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
+Source2: %{name}.pc
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(gio-2.0)
@@ -24,10 +25,25 @@ Project Connected Home over IP is a new Working Group within the Zigbee Alliance
This Working Group plans to develop and promote the adoption of a new, royalty-free
connectivity standard to increase compatibility among smart home products, with security as a fundamental design tenet
+%package devel
+Summary: Connected Home over IP for development
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+This package is for CHIP development
+
+%package test
+Summary: Connected Home over IP Test applications
+Requires: %{name} = %{version}-%{release}
+
+%description test
+This package is for CHIP test applications
+
%prep
%setup -q
chmod 644 %{SOURCE0}
cp %{SOURCE1} ./%{name}.manifest
+cp %{SOURCE2} ./%{name}.pc
%build
gn gen out/host --args='is_debug=true target_os="linux" current_cpu="arm"'
@@ -35,6 +51,23 @@ ninja -C out/host
%install
# ninja install
+
+# install libraries
+mkdir -p %{buildroot}%{_libdir}/chip/
+find ./out/host/lib -name "*.a" -exec cp '{}' %{buildroot}%{_libdir}/chip/ \;
+
+cd out/host/obj
+find ./ -type d -exec mkdir -p %{buildroot}%{_libdir}/chip/{} \;
+find ./ -name "*.a" -exec cp '{}' %{buildroot}%{_libdir}/chip/{} \;
+cd -
+
+# install header files
+mkdir -p %{buildroot}%{_includedir}/chip/
+find ./ -type d -exec mkdir -p %{buildroot}%{_includedir}/chip/{} \;
+find ./ -name "*.h" -exec cp '{}' %{buildroot}%{_includedir}/chip/{} \;
+find ./ -name "*.hpp" -exec cp '{}' %{buildroot}%{_includedir}/chip/{} \;
+
+# install examples
mkdir -p %{buildroot}%{_bindir}
cp out/host/chip-tool %{buildroot}%{_bindir}/
@@ -45,18 +78,22 @@ cp out/host/minimal-mdns-client %{buildroot}%{_bindir}/
cp out/host/minimal-mdns-server %{buildroot}%{_bindir}/
cp out/host/mdns-advertiser %{buildroot}%{_bindir}/
+# install pkg-config file
+mkdir -p %{buildroot}%{_libdir}/pkgconfig
+cp %{name}.pc %{buildroot}%{_libdir}/pkgconfig
+
%post
%files
%manifest %{name}.manifest
%license LICENSE
+%{_libdir}/chip/*
-%package test
-Summary: Connected Home over IP Test applications
-Requires: %{name} = %{version}-%{release}
-
-%description test
-This package is for CHIP test applications
+%files devel
+%manifest %{name}.manifest
+%{_includedir}/chip/*
+%{_libdir}/chip/*
+%{_libdir}/pkgconfig/*.pc
%files test
%manifest %{name}.manifest