diff options
author | Jihoon Jung <jh8801.jung@samsung.com> | 2021-04-08 12:37:23 +0900 |
---|---|---|
committer | Jihoon Jung <jh8801.jung@samsung.com> | 2021-04-08 12:37:23 +0900 |
commit | eec74fae534ceecc6498afecba90371d879fd9fb (patch) | |
tree | 2015acf9feedf4f48e4a697be425216251430487 | |
parent | 513ffaf9fc7a15a133acfe8b752837f4055c6a28 (diff) | |
download | connectedhomeip-eec74fae534ceecc6498afecba90371d879fd9fb.tar.gz connectedhomeip-eec74fae534ceecc6498afecba90371d879fd9fb.tar.bz2 connectedhomeip-eec74fae534ceecc6498afecba90371d879fd9fb.zip |
Add pkg-config file and packages for development
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
-rw-r--r-- | packaging/connectedhomeip.pc | 18 | ||||
-rwxr-xr-x | packaging/connectedhomeip.spec | 49 |
2 files changed, 61 insertions, 6 deletions
diff --git a/packaging/connectedhomeip.pc b/packaging/connectedhomeip.pc new file mode 100644 index 00000000..4442f495 --- /dev/null +++ b/packaging/connectedhomeip.pc @@ -0,0 +1,18 @@ + +# Package Information for pkg-config + +package_name=connectedhomeip +prefix=@PREFIX@ +exec_prefix=/usr +libdir=/usr/lib +chip_libdir=/usr/lib/chip +includedir=/usr/include +chip_includedir=/usr/include/chip + +Name: ${package_name} +Description: Connected Home over IP +Version: @VERSION@ +Requires: dbus-1, dns_sd +Libs: -L${libdir} -L${chip_libdir} -lCHIP +Cflags: -I${includedir} -I${chip_includedir} +CXXflags: -I${includedir} -I${chip_includedir} 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 |