first commit
[scm/bb/meta-tizen.git] / recipes-tizen / calendar-service / calendar-service.inc
1 DESCRIPTION = "DB library for calendar"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "System/Libraries"
4 LICENSE = "Apache 2.0"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by calendar-service 
13 PROVIDES += "calendar-service"
14 RPROVIDES_calendar-service += "calendar-service"
15
16 #PROVIDES by calendar-service-devel 
17 PROVIDES += "calendar-service-devel"
18 RPROVIDES_calendar-service-devel += "calendar-service-devel"
19 RPROVIDES_calendar-service-devel += "calendar-service-dev"
20
21 RDEPENDS = ""
22 #RDEPENDS of calendar-service (${PN})
23 RDEPENDS_${PN} += "/bin/chown"
24 RDEPENDS_${PN} += "/sbin/ldconfig"
25 RDEPENDS_${PN} += "/usr/bin/sqlite3"
26
27 #RDEPENDS of calendar-service-devel (${PN}-devel)
28 RDEPENDS_${PN}-devel += "calendar-service"
29 RDEPENDS_${PN}-devel += "pkgconfig(alarm-service)"
30
31
32 DEPENDS = ""
33 #DEPENDS of calendar-service 
34 DEPENDS += "pkgconfig(pims-ipc)"
35 DEPENDS += "pkgconfig(contacts-service2)"
36 DEPENDS += "cmake"
37 DEPENDS += "pkgconfig(alarm-service)"
38 DEPENDS += "pkgconfig(capi-base-common)"
39 DEPENDS += "app-svc"
40 DEPENDS += "bundle"
41 DEPENDS += "pkgconfig(icu-i18n)"
42 DEPENDS += "pkgconfig(sqlite3)"
43 DEPENDS += "pkgconfig(vconf)"
44 DEPENDS += "pkgconfig(glib-2.0)"
45 DEPENDS += "pkgconfig(dlog)"
46 DEPENDS += "pkgconfig(db-util)"
47
48 do_patch() {
49  chmod -Rf a+rX,u+w,g-w,o-w ${S}
50  #setup -q
51  cp ${S}/packaging/calendar-service.manifest .
52  
53  
54  
55 }
56
57 do_configure() {
58 }
59
60 do_compile() {
61  LANG=C
62  export LANG
63  unset DISPLAY
64  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
65  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
66  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
67  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
68  
69  
70    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
71    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
72    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
73    cmake \
74          -DCMAKE_VERBOSE_MAKEFILE=ON \
75          -DCMAKE_INSTALL_PREFIX:PATH=/usr \
76          -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib \
77          -DINCLUDE_INSTALL_DIR:PATH=/usr/include \
78          -DLIB_INSTALL_DIR:PATH=/usr/lib \
79          -DSYSCONF_INSTALL_DIR:PATH=/etc \
80          -DSHARE_INSTALL_PREFIX:PATH=/usr/share \
81          -DCMAKE_SKIP_RPATH:BOOL=ON \
82          -DBUILD_SHARED_LIBS:BOOL=ON \
83          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake .
84  
85  
86  make -j16
87  
88  
89  
90 }
91
92 do_install() {
93  echo export RPM_BUILD_ROOT=${D}
94  LANG=C
95  export LANG
96  unset DISPLAY
97  rm -rf ${D} 
98  mkdir -p ${D} 
99  
100  
101    oe_runmake \
102          DESTDIR=${D} \
103          INSTALL_ROOT=${D} \
104          BINDIR=/usr/bin \
105    install  
106    rm -f ${D}/usr/share/info/dir 
107    find ${D} -regex ".*\.la$" | xargs rm -f -- 
108    find ${D} -regex ".*\.a$" | xargs rm -f --
109  
110  mkdir -p ${D}/etc/rc.d/rc3.d/
111  mkdir -p ${D}/etc/rc.d/rc5.d/
112  ln -s ../init.d/calendar-serviced.sh ${D}/etc/rc.d/rc3.d/S85calendar-serviced
113  ln -s ../init.d/calendar-serviced.sh ${D}/etc/rc.d/rc5.d/S85calendar-serviced
114  
115  mkdir -p ${D}/lib/systemd/user/tizen-middleware.target.wants
116  install ${S}/packaging/calendar.service ${D}/lib/systemd/user/
117  ln -s ../calendar.service ${D}/lib/systemd/user/tizen-middleware.target.wants/
118  
119  
120 }
121
122 PACKAGES = ""
123 PACKAGES += "calendar-service"
124 PACKAGES += "calendar-service-devel"
125
126 calendar-service_files = ""
127 calendar-service_files += "calendar-service.manifest"
128 calendar-service_files += "/usr/bin/calendar-serviced*"
129 calendar-service_files += "/usr/lib/libcalendar-service2.so.*"
130 calendar-service_files += "/etc/rc.d/rc3.d/S85calendar-serviced"
131 calendar-service_files += "/etc/rc.d/rc5.d/S85calendar-serviced"
132 #Remove rpm attribut "%attr(0775,root,root)"
133 calendar-service_files += "/opt/usr/data/calendar-svc/"
134 calendar-service_files += "/opt/usr/data/calendar-svc/.CALENDAR_SVC_CALENDAR_CHANGED"
135 calendar-service_files += "/opt/usr/data/calendar-svc/.CALENDAR_SVC_EVENT_CHANGED"
136 calendar-service_files += "/opt/usr/data/calendar-svc/.CALENDAR_SVC_TODO_CHANGED"
137 calendar-service_files += "/usr/share/calendar-svc/dft-calendar"
138 calendar-service_files += "/opt/usr/dbspace/.calendar-svc.db*"
139 calendar-service_files += "/lib/systemd/user/calendar.service"
140 calendar-service_files += "/lib/systemd/user/tizen-middleware.target.wants/calendar.service"
141
142 calendar-service-devel_files = ""
143 calendar-service-devel_files += "calendar-service.manifest"
144 calendar-service-devel_files += "/usr/include/calendar-service/*.h"
145 calendar-service-devel_files += "/usr/include/calendar-service2/*.h"
146 calendar-service-devel_files += "/usr/lib/*.so"
147 calendar-service-devel_files += "/usr/lib/pkgconfig/calendar.pc"
148 calendar-service-devel_files += "/usr/lib/pkgconfig/calendar-service2.pc"
149 calendar-service-devel_files += "/opt/usr/data/calendar-svc/calendar-svc-initdb"
150
151 FILES_${PN} = "${calendar-service_files}"
152 FILES_${PN}-devel = "${calendar-service-devel_files}"
153
154 PKG_calendar-service= "calendar-service"
155 PKG_calendar-service-devel= "calendar-service-devel"
156
157 require calendar-service-extraconf.inc