use pkgconfig on tizen-platform-wrapper 16/21016/1
authorRonan Le Martret <ronan@fridu.net>
Wed, 14 May 2014 12:10:35 +0000 (14:10 +0200)
committerRonan Le Martret <ronan@fridu.net>
Wed, 14 May 2014 12:10:35 +0000 (14:10 +0200)
Change-Id: Iee4a980ed41c192d7f1861f8eb2f4e0312c04331
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
configure.ac
packaging/tizen-platform-config.spec
src/Makefile.am

index 7eef55a..4ff65ef 100644 (file)
@@ -1,22 +1,21 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
 AC_INIT([libtzplatform-config], [1.0])
 AC_PREREQ([2.59])
 AM_INIT_AUTOMAKE([1.10 -Wall no-define])
 
+# Checks for programs.
 AC_CONFIG_HEADERS([config.h ])
 AC_PROG_CC
 AM_PROG_AR
 LT_INIT([disable-static])
 
 AC_SUBST([LIBTZPLATFORM_CONFIG_SO_VERSION], [1:0:0])
 AC_SUBST([LIBTZPLATFORM_CONFIG_VERSION], [1.0])
 
 AC_CONFIG_FILES([
 Makefile
 src/Makefile
 libtzplatform-config.pc:libtzplatform-config.pc.in])
 AC_OUTPUT
-
index 0030c15..d6dd2c3 100644 (file)
@@ -12,8 +12,8 @@ Source1:        %{name}-rpmlintrc
 Source1001:     %{name}.manifest
 BuildRequires:  tizen-platform-wrapper
 
-# the main package only contains a config file but other dependent packages 
-# will contain binary. So, we can't build a noarch package and have to avoid 
+# the main package only contains a config file but other dependent packages
+# will contain binary. So, we can't build a noarch package and have to avoid
 # a rpmlint warning using a filter in xxx-rpmlintrc
 
 %description
@@ -33,7 +33,8 @@ Group:          Development/Libraries
 License:        LGPL-2.0
 Requires:       %{libname} = %{version}
 %description -n %{libname}-devel
-Tizen Platform Configuration - helper library headers to include in source code, RPM macros to call in spec files
+Tizen Platform Configuration - helper library headers to include in source code,
+RPM macros to call in spec files
 
 %package -n %{name}-tools
 Summary:        Tizen Platform Configuration - tools
@@ -48,13 +49,11 @@ Tizen Platform Configuration - helper program to lookup Tizen variables easily
 cp %{SOURCE1001} .
 
 %build
-%reconfigure \
-    --disable-static
-
-make %{?_smp_mflags}
+%reconfigure --disable-static
+%__make %{?_smp_mflags}
 
 %check
-make check
+%__make check
 
 %install
 %make_install
@@ -83,3 +82,4 @@ make check
 %files -n %{name}-tools
 %manifest %{name}.manifest
 %{_bindir}/*
+
index 4534c18..0d2a594 100644 (file)
@@ -2,6 +2,8 @@ lib_LTLIBRARIES = libtzplatform-config-@LIBTZPLATFORM_CONFIG_VERSION@.la
 
 bin_PROGRAMS = tzplatform-get
 
+wrappersrcdir=$(shell pkg-config --variable=srcdir tizen-platform-wrapper)
+
 SRC_FROMWRAPPER= \
        buffer.h \
        buffer.c \
@@ -16,7 +18,7 @@ SRC_FROMWRAPPER= \
        scratch.h \
        scratch.c \
        tzplatform_config.c \
-       tzplatform_config.h 
+       tzplatform_config.h
 
 SRC_FROMTOOL= \
        tzplatform_variables.h \
@@ -34,7 +36,7 @@ tizen-platform.conf: ../tizen-platform.meta
        tzplatform-tool pretty $< >$@
 
 $(SRC_FROMWRAPPER) tzplatform_get.c:
-       cp $(datadir)/tizen-platform-wrapper/$@ .
+       cp $(wrappersrcdir)/tizen-platform-wrapper/$@ .
 
 tzplatform_variables.h: tizen-platform.conf
        tzplatform-tool h $< >$@
@@ -45,7 +47,7 @@ hash.inc: tizen-platform.conf
 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS = -version-info $(LIBTZPLATFORM_CONFIG_SO_VERSION)
 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -export-symbols-regex tzplatform_.*
 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -Wl,-O3
-libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -lpthread 
+libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -lpthread
 
 libtzplatform_config_includedir = $(includedir)/
 nobase_libtzplatform_config_include_HEADERS = tzplatform_variables.h tzplatform_config.h
@@ -60,5 +62,3 @@ dist_tzplatform_config_sysconf_DATA=macros.tizen-platform
 
 tzplatform_get_SOURCES = tzplatform_get.c
 tzplatform_get_LDADD = libtzplatform-config-@LIBTZPLATFORM_CONFIG_VERSION@.la
-
-