Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Commit

Permalink
Add supporting pkg-config for tizen (#127)
Browse files Browse the repository at this point in the history
libtuv-DCO-1.0-Signed-off-by: Haesik Jun [email protected]
  • Loading branch information
haesik authored and yichoi committed Sep 12, 2018
1 parent 914dcfe commit c6aacf3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions cmake/option/option_noarch-tizen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
include("cmake/option/option_unix_common.cmake")
include("cmake/option/option_linux_common.cmake")

# package config
SET(prefix "/usr")
SET(exec_prefix "${prefix}/bin")
SET(includedir "${prefix}/include/${PROJECT_NAME}")
SET(libdir "${prefix}/lib")
SET(libname "${PROJECT_NAME}")
CONFIGURE_FILE(${libname}.pc.in ${libname}.pc @ONLY)

# gbs-tizen specific
if(DEFINED TARGET_BOARD)
if(${TARGET_BOARD} STREQUAL "rpi3")
Expand Down
7 changes: 4 additions & 3 deletions config/tizen/packaging/libtuv.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Version: 1.0.0
Release: 0
Summary: Asynchronous I/O for embedded system
Group: Development/System
License: Apache-2.0
License: Apache-2.0 and MIT
Source: %{name}-%{version}.tar.gz
Source1: %{name}.pc.in
Source1001: %{name}.manifest
Expand All @@ -43,6 +43,7 @@ Development libraries for %{name}

%prep
%setup -q -c
cp %{SOURCE1} .
cp %{SOURCE1001} .

%build
Expand All @@ -54,9 +55,9 @@ mkdir -p %{buildroot}%{_includedir}/libtuv
mkdir -p %{buildroot}%{_libdir}/pkgconfig

cp ./build/%{platform}/%{build_mode}/lib/* %{buildroot}%{_libdir}/

cp ./include/*.h %{buildroot}%{_includedir}/libtuv
cp ./config/tizen/packaging/%{name}.pc.in %{buildroot}/%{_libdir}/pkgconfig/%{name}.pc
cp ./build/%{platform}/%{build_mode}/cmake/libtuv.pc %{buildroot}/%{_libdir}/pkgconfig/%{name}.pc


%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
Expand Down

0 comments on commit c6aacf3

Please sign in to comment.