On 12/19/2013 10:32 AM, Leibowitz, Michael wrote:
> On Wed, Dec 18, 2013 at 4:35 PM, Kyungmin Park
> <[email protected]> wrote:
>> Now we’re trying to build buxton at Tizen v2.2 for testing purpose. But it’s
>> hard to use it. Fix one build issues, it makes another problem and so on.
> We've been testing on Tizen 3.0.
I had generated some patches for buxton.
To build buxton on gbs environment:
0001-build-add-spec-file-for-gbs-build.patch
To link other package: 0002-pkgconfig-buxton-package-config-added.patch
To resolve link error: 0003-libbuxton-resolve-symbol-reference.patch

After this, I could use buxton symbol at other package.
And I can see this:

sh-4.1# buxtonctl --help
buxtonctl: Usage

          get-string - Get a string value by key
          set-string - Set a key with a string value
           get-int32 - Get an int32_t value by key
           set-int32 - Set a key with an int32_t value
           get-int64 - Get an int64_t value by key
           set-int64 - Set a key with an int64_t value
           get-float - Get a float point value by key
           set-float - Set a key with a floating point value
          get-double - Get a double precision value by key
          set-double - Set a key with a double precision value
            get-bool - Get a boolean value by key
            set-bool - Set a key with a boolean value
           get-label - Get a label for a value
           set-label - Set a value's label
         unset-value - Unset a value by key
>> How do you test it at Tizen platform? How can it test it? Requested tests
>> are simple.
> Make check.  There are also timing tests.  See Makefile.am
>
>> 1.     Get/set
>>
>> 2.     Thread safe read/write
> This is not tested.
Could you send some sample code to set or get key?
And could you explain about the layer concept?
>> 3.     Performance comparison with many properties, more than 100,000?
> demo/timing has 100k iterations.  see demo/timing.c
>
>> P.S., Here’s buxton.spec.
> Thanks!
>
> Cheers
>
>

>From 755909bf6221bc3cee38e06a1a4f7d36035f2e2e Mon Sep 17 00:00:00 2001
From: WaLyong Cho <[email protected]>
Date: Fri, 13 Dec 2013 10:48:50 +0900
Subject: [PATCH 1/3] build: add spec file for gbs build

---
 packaging/buxton.spec |   62 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 packaging/buxton.spec

diff --git a/packaging/buxton.spec b/packaging/buxton.spec
new file mode 100644
index 0000000..c978219
--- /dev/null
+++ b/packaging/buxton.spec
@@ -0,0 +1,62 @@
+Name:    buxton
+Version: 0.1
+Release: 1
+License: LGPL-2.1
+Group:   Framework/system
+Summary: buxton
+Source0: %{name}-%{version}.tar.bz2
+
+BuildRequires: pkgconfig(check)
+BuildRequires: pkgconfig(libsystemd-daemon)
+BuildRequires: libattr-devel
+BuildRequires: gdbm-devel
+
+Requires: gdbm
+
+%description
+buxton
+
+%package libs
+Summary:  buxton libraries
+License:  LGPL-2.1
+
+%description libs
+buxton libraries
+
+%package devel
+Summary:  buxton devel
+License:  LGPL-2.1
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+buxton devel
+
+%prep
+%setup -q
+
+%build
+./autogen.sh
+%configure
+
+make %{?_smp_mflags}
+
+%install
+%make_install
+
+%files
+%{_sysconfdir}/buxton.conf
+%{_bindir}/buxtonctl
+%{_libdir}/systemd/system/buxton.service
+%{_libdir}/systemd/system/buxton.socket
+%{_libdir}/systemd/system/sockets.target.wants/buxton.socket
+%{_sbindir}/bt-daemon
+
+%files libs
+%{_libdir}/libbuxton.so.*
+
+%files devel
+%{_includedir}/bt-daemon.h
+%{_libdir}/buxton/gdbm.so
+%{_libdir}/buxton/memory.so
+%{_libdir}/libbuxton.so
+%{_libdir}/pkgconfig/buxton.pc
-- 
1.7.9.5

>From 496b18a2e80a14c2a631d33c79d16be7d4e5ecfe Mon Sep 17 00:00:00 2001
From: WaLyong Cho <[email protected]>
Date: Thu, 19 Dec 2013 10:47:45 +0900
Subject: [PATCH 2/3] pkgconfig: buxton package config added

---
 Makefile.am  |    3 +++
 buxton.pc.in |   10 ++++++++++
 configure.ac |    1 +
 3 files changed, 14 insertions(+)
 create mode 100644 buxton.pc.in

diff --git a/Makefile.am b/Makefile.am
index f02ac0d..de18782 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,6 +32,9 @@ pkglib_LTLIBRARIES =
 DISTCHECK_CONFIGURE_FLAGS =  \
 	--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = buxton.pc
+
 systemdsystemunitdir = @SYSTEMD_SYSTEMUNITDIR@
 systemdsystemunit_DATA = data/buxton.service data/buxton.socket
 
diff --git a/buxton.pc.in b/buxton.pc.in
new file mode 100644
index 0000000..d9fe962
--- /dev/null
+++ b/buxton.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: buxton
+Description: Buxton Client Interface
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}/buxton
+Libs: -L${libdir} -lbuxton
diff --git a/configure.ac b/configure.ac
index 6c3492b..901a0cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -181,6 +181,7 @@ AS_IF([test "x$enable_demos" = "xyes"],
 AM_CONDITIONAL([BUILD_DEMOS], [test x$enable_demos = x"yes"])
 
 AC_CONFIG_FILES([
+buxton.pc
 data/buxton.service
 data/buxton.socket
 test/test-pass.ini
-- 
1.7.9.5

>From f1b891082f56a8bfdd77d281b08a12a242dee1e4 Mon Sep 17 00:00:00 2001
From: WaLyong Cho <[email protected]>
Date: Wed, 18 Dec 2013 23:09:17 +0900
Subject: [PATCH 3/3] libbuxton: resolve symbol reference

---
 Makefile.am               |    3 ++-
 src/shared/constants.c.in |   10 +++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index de18782..3ab6f53 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -158,7 +158,8 @@ lib_LTLIBRARIES += \
 	libbuxton.la
 
 libbuxton_la_SOURCES = \
-	src/libbuxton/lbuxton.c
+	src/libbuxton/lbuxton.c \
+	src/shared/constants.c
 
 libbuxton_la_CFLAGS = \
 	$(AM_CFLAGS) \
diff --git a/src/shared/constants.c.in b/src/shared/constants.c.in
index 02b93ab..97f010c 100644
--- a/src/shared/constants.c.in
+++ b/src/shared/constants.c.in
@@ -21,11 +21,11 @@ const char *DB_PATH = "/tmp";
 const char *BUXTON_SOCKET = "/tmp/buxton-socket";
 const char *SMACK_LOAD_FILE = "@abs_top_srcdir@/test/test.load2";
 #else
-const char *MODULE_DIRECTORY = _MODULE_DIRECTORY;
-const char *DEFAULT_CONFIGURATION_FILE = _DEFAULT_CONFIGURATION_FILE;
-const char *DB_PATH = _DB_PATH;
-const char *BUXTON_SOCKET = _BUXTON_SOCKET;
-const char *SMACK_LOAD_FILE = _SMACK_LOAD_FILE;
+const char *MODULE_DIRECTORY = "@MODULEDIR@";
+const char *DEFAULT_CONFIGURATION_FILE = "@CONFPATH@";
+const char *DB_PATH = "@DB_PATH@";
+const char *BUXTON_SOCKET = "@BUXTON_SOCKET@";
+const char *SMACK_LOAD_FILE = "@SMACK_LOAD_FILE@";
 #endif
 
 /*
-- 
1.7.9.5

_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to