make eom-server package 89/108589/4
authorJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 5 Jan 2017 07:06:25 +0000 (16:06 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 12 Jan 2017 08:00:52 +0000 (17:00 +0900)
Change-Id: Ib4581b34a0b1b84f715d8d3cbccec428093c2aad
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
Makefile.am
configure.ac
eom-server.pc.in [new file with mode: 0644]
include/eom.pc.in
packaging/libeom.spec
src/Makefile.am

index c2108dc..18ce1fb 100755 (executable)
@@ -30,3 +30,6 @@ else
 SUBDIRS = include src
 endif
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = eom-server.pc
+
index 42342e7..248a44b 100755 (executable)
@@ -69,10 +69,11 @@ PKG_CHECK_MODULES(ELEMENTARY, elementary)
 
 LIBEOM_CFLAGS="$DBUS_CFLAGS $GLIB_CFLAGS $ELEMENTARY_CFLAGS "
 LIBEOM_LIBS="$DBUS_LIBS $GLIB_LIBS $ELEMENTARY_LIBS "
+LIBEOM_SERVER_CFLAGS="$DBUS_CFLAGS $GLIB_CFLAGS "
+LIBEOM_SERVER_LIBS="$DBUS_LIBS $GLIB_LIBS "
 
 PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner)
 
-
 PKG_CHECK_MODULES(WAYLAND_CLIENT, wayland-client)
 PKG_CHECK_MODULES(XDG_SHELL_CLIENT, xdg-shell-client)
 LIBEOM_CFLAGS="$LIBEOM_CFLAGS $WAYLAND_CLIENT_CFLAGS $XDG_SHELL_CLIENT_CFLAGS"
@@ -93,6 +94,8 @@ if test "x$CAPI_VER" = "xyes"; then
     AC_DEFINE(HAVE_CAPI_0_1_1,1,[The version of capi-base-common is over 0.1.1])
     LIBEOM_CFLAGS="$LIBEOM_CFLAGS $CAPI_CFLAGS"
     LIBEOM_LIBS="$LIBEOM_LIBS $CAPI_LIBS"
+    LIBEOM_SERVER_CFLAGS="$LIBEOM_SERVER_CFLAGS $CAPI_CFLAGS"
+    LIBEOM_SERVER_LIBS="$LIBEOM_SERVER_LIBS $CAPI_LIBS"
 fi
 
 AC_CHECK_LIB(dlog, __dlog_print, [have_dlog="yes"], [have_dlog="no"])
@@ -105,11 +108,14 @@ fi
 
 AC_SUBST([LIBEOM_CFLAGS])
 AC_SUBST([LIBEOM_LIBS])
+AC_SUBST([LIBEOM_SERVER_CFLAGS])
+AC_SUBST([LIBEOM_SERVER_LIBS])
 
 # Checks for header files.
 AC_HEADER_STDC
 
 AC_OUTPUT([Makefile
+           eom-server.pc
            src/Makefile
            include/Makefile
            include/eom.pc
@@ -119,3 +125,5 @@ echo "CFLAGS       : $CFLAGS"
 echo "LDFLAGS      : $LDFLAGS"
 echo "LIBEOM_CFLAGS: $LIBEOM_CFLAGS"
 echo "LIBEOM_LIBS  : $LIBEOM_LIBS"
+echo "LIBEOM_SERVER_CFLAGS: $LIBEOM_SERVER_CFLAGS"
+echo "LIBEOM_SERVER_LIBS  : $LIBEOM_SERVER_LIBS"
diff --git a/eom-server.pc.in b/eom-server.pc.in
new file mode 100644 (file)
index 0000000..d56e6d0
--- /dev/null
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: eom-server
+Description: The External Output Manager Server Library
+Version: @PACKAGE_VERSION@
+Requires.private: dbus-1 gio-unix-2.0
+Requires: capi-base-common
+Cflags: -I${includedir}/eom
+Libs: -L${libdir} -leom-server-protocol
index 1a89a1b..b795246 100644 (file)
@@ -9,4 +9,4 @@ Version: @PACKAGE_VERSION@
 Requires.private: dbus-1 gio-unix-2.0
 Requires: capi-base-common
 Cflags: -I${includedir}/eom
-Libs: -L${libdir} -leom -leom-server-protocol
+Libs: -L${libdir} -leom
index 0235b96..ff43c91 100644 (file)
@@ -34,6 +34,21 @@ Requires: pkgconfig(capi-base-common)
 %description devel
 External Output Manager Library development package
 
+%package -n libeom-server
+Summary: EOM Server Library
+Group: Development/Libraries
+
+%description -n libeom-server
+External Output Manager Server Library
+
+%package -n libeom-server-devel
+Summary: EOM Server Library development package
+Group: Development/Libraries
+Requires: libeom-server = %{version}
+
+%description -n libeom-server-devel
+External Output Manager Server Library development package
+
 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
 
 %prep
@@ -70,13 +85,14 @@ cp src/eom-server-protocol.h %{buildroot}/usr/include
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
+%post -n libeom-server -p /sbin/ldconfig
+%postun -n libeom-server -p /sbin/ldconfig
+
 %files
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
 %{TZ_SYS_RO_SHARE}/license/%{name}
-%{_includedir}/eom-server-protocol.h
 %{_libdir}/libeom.so.*
-%{_libdir}/libeom-server-protocol.so.*
 %if %{with utest}
 %{_bindir}/ut
 %endif
@@ -86,6 +102,20 @@ cp src/eom-server-protocol.h %{buildroot}/usr/include
 %dir %{_includedir}/eom/
 %{_includedir}/eom/*.h
 %{_libdir}/libeom.so
-%{_libdir}/libeom-server-protocol.so
 %{_libdir}/pkgconfig/eom.pc
 
+%files -n libeom-server
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{TZ_SYS_RO_SHARE}/license/%{name}
+%{_includedir}/eom-server-protocol.h
+%{_includedir}/eom/eom.h
+%{_libdir}/libeom-server-protocol.so.*
+
+%files -n libeom-server-devel
+%manifest %{name}.manifest
+%dir %{_includedir}/eom/
+%{_includedir}/eom-server-protocol.h
+%{_includedir}/eom/eom.h
+%{_libdir}/libeom-server-protocol.so
+%{_libdir}/pkgconfig/eom-server.pc
index 2e213b2..ccad52d 100755 (executable)
@@ -29,10 +29,10 @@ libeom_ladir = $(libdir)
 libeom_la_LIBADD = @LIBEOM_LIBS@
 libeom_la_LDFLAGS = ${LDFLAGS}
 libeom_la_CFLAGS = \
-    ${CFLAGS} \
-    @LIBEOM_CFLAGS@ \
-    -I$(top_srcdir)/include \
-    -I$(top_srcdir)/src \
+       ${CFLAGS} \
+       @LIBEOM_CFLAGS@ \
+       -I$(top_srcdir)/include \
+       -I$(top_srcdir)/src \
        -I$(top_srcdir)/protocol
 
 libeom_la_SOURCES = \
@@ -40,6 +40,10 @@ libeom_la_SOURCES = \
        eom-wayland.c \
        eom-protocol.c
 
+libeom_protocol_la_SOURCES = \
+       eom-client-protocol.h \
+       eom-protocol.c
+
 %-protocol.c : $(top_srcdir)/protocol/%.xml
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
 
@@ -49,22 +53,22 @@ libeom_la_SOURCES = \
 %-client-protocol.h : $(top_srcdir)/protocol/%.xml
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
 
-BUILT_SOURCES = eom-protocol.c \
-                eom-client-protocol.h \
-                eom-server-protocol.h
-
 libeom_server_protocol_la_LTLIBRARIES = libeom-server-protocol.la
 libeom_server_protocol_ladir = $(libdir)
-libeom_server_protocol_la_LIBADD = @LIBEOM_LIBS@
+libeom_server_protocol_la_LIBADD = @LIBEOM_SERVER_LIBS@
 libeom_server_protocol_la_LDFLAGS = ${LDFLAGS}
 libeom_server_protocol_la_CFLAGS = \
-    ${CFLAGS} \
-    @LIBEOM_CFLAGS@ \
-    -I$(top_srcdir)/src
+       ${CFLAGS} \
+       @LIBEOM_SERVER_CFLAGS@ \
+       -I$(top_srcdir)/src
 
 libeom_server_protocol_la_SOURCES = \
-    eom-protocol.c
-
+       eom-protocol.c \
+       eom-client-protocol.h \
+       eom-server-protocol.h
 
+BUILT_SOURCES = \
+       $(libeom_server_protocol_la_SOURCES) \
+       $(libeom_protocol_la_SOURCES)