AM_PROG_AR
LT_INIT([disable-static])
-AC_SUBST([LIBTZPLATFORM_CONFIG_SO_VERSION], [1:0:0])
-AC_SUBST([LIBTZPLATFORM_CONFIG_VERSION], [1.0])
+AC_SUBST([LIBTZPLATFORM_CONFIG_SO_VERSION], [2:0:0])
+AC_SUBST([LIBTZPLATFORM_CONFIG_VERSION], [2.0])
AC_CONFIG_FILES([
Makefile
%define libname libtzplatform-config
+%define keepstatic 1
Name: tizen-platform-config
-Version: 1.0
+Version: 2.0
Release: 0
Summary: Tizen Platform Configuration
License: MIT
Source0: %{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
Source1001: %{name}.manifest
-BuildRequires: tizen-platform-wrapper
+BuildRequires: tizen-platform-wrapper >= 2
# 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
cp %{SOURCE1001} .
%build
-%reconfigure --disable-static
+%reconfigure --enable-static
%__make %{?_smp_mflags}
%check
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*.h
%config %{_sysconfdir}/rpm/macros.tizen-platform
+%{_libdir}/*.a
%files -n %{name}-tools
%manifest %{name}.manifest
lib_LTLIBRARIES = libtzplatform-config-@LIBTZPLATFORM_CONFIG_VERSION@.la
+lib_LIBRARIES = libtzplatform-config-static.a
+
bin_PROGRAMS = tzplatform-get
-wrappersrcdir=$(shell pkg-config --variable=srcdir tizen-platform-wrapper)
+wrappersrcdir=$(shell pkg-config --variable=datadir tizen-platform-wrapper)
+
+SRC_FROMWRAPPER_STATIC= \
+ static-api.c
-SRC_FROMWRAPPER= \
+SRC_FROMWRAPPER_SHARED= \
buffer.h \
buffer.c \
foreign.h \
passwd.c \
scratch.h \
scratch.c \
- tzplatform_config.c \
+ context.c \
+ context.h \
+ hashing.c \
+ hashing.h \
+ init.c \
+ init.h \
+ shared-api.c \
+ shared-api.h \
+ tzplatform_config.sym \
tzplatform_config.h
+SRC_FROMWRAPPER=$(SRC_FROMWRAPPER_SHARED) $(SRC_FROMWRAPPER_STATIC)
+
SRC_FROMTOOL= \
tzplatform_variables.h \
+ signup.inc \
hash.inc
+CFLAGS += -fPIC
+
BUILT_SOURCES=$(SRC_FROMWRAPPER) $(SRC_FROMTOOL)
CLEANFILES=$(SRC_FROMWRAPPER) $(SRC_FROMTOOL)
-nodist_libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_SOURCES = \
- $(SRC_FROMWRAPPER) \
+libtzplatform_config_static_a_SOURCES = $(SRC_FROMWRAPPER_STATIC)
+
+libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_SOURCES = \
+ $(SRC_FROMWRAPPER_SHARED) \
$(SRC_FROMTOOL)
tizen-platform.conf: ../tizen-platform.meta
hash.inc: tizen-platform.conf
tzplatform-tool c $< >$@
+signup.inc: tizen-platform.conf
+ tzplatform-tool signup $< >$@
+
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,--version-script=tzplatform_config.sym
libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -Wl,-O3
libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -lpthread
dist_tzplatform_config_sysconf_DATA=macros.tizen-platform
tzplatform_get_SOURCES = tzplatform_get.c
-tzplatform_get_LDADD = libtzplatform-config-@LIBTZPLATFORM_CONFIG_VERSION@.la
+tzplatform_get_LDADD = libtzplatform-config-static.a libtzplatform-config-@LIBTZPLATFORM_CONFIG_VERSION@.la
+
+
+