66c6af4ca08c3fd2d856daa3deccb0050ded8f2e
[scm/bb/meta-tizen.git] / meta-tizen-common-base / recipes-security / gsignond / gsignond.inc
1 DESCRIPTION = "GLib based Single Sign-On daemon"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Security/Accounts"
4 LICENSE = "LGPL-2.1+ and GPL-2.0+"
5 PV = "1.0.3"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by gsignond-doc
17 PROVIDES += "gsignond-doc"
18
19
20 #PROVIDES by gsignond
21 # the PROVIDES rules is ignore "gsignon  "
22 PROVIDES += "gsignon"
23 RPROVIDES_gsignond += "gsignon"
24
25
26 #PROVIDES by gsignond-dev
27 PROVIDES += "gsignond-dev"
28
29
30 RDEPENDS = ""
31 #RDEPENDS of gsignond-doc (${PN}-doc)
32 RDEPENDS_${PN}-doc += "gsignond"
33
34 #RDEPENDS of gsignond (${PN})
35 RDEPENDS_${PN} += "glibc"
36
37 #RDEPENDS of gsignond-dev (${PN}-dev)
38 RDEPENDS_${PN}-dev += "gsignond"
39
40
41 DEPENDS = ""
42 #DEPENDS of gsignond
43 inherit pkgconfig
44 DEPENDS += "glib-2.0"
45 DEPENDS += "ecryptfs-utils"
46 DEPENDS += "smack"
47 DEPENDS += "sqlite3"
48 DEPENDS += "dbus"
49
50 do_prep() {
51  cd ${S}
52  chmod -Rf a+rX,u+w,g-w,o-w ${S}
53  #setup -q -n gsignond-1.0.3
54  cp ${S}/packaging/gsignond.manifest .
55  
56  
57 }
58 do_patch_append() {
59     bb.build.exec_func('do_prep', d)
60 }
61
62 do_configure() {
63 }
64
65 do_compile() {
66  cd ${S}
67   LANG=C
68   export LANG
69   unset DISPLAY
70   LD_AS_NEEDED=1; export LD_AS_NEEDED ;
71   
72   
73   autotools_do_configure
74   
75   oe_runmake ${PARALLEL_MAKE}
76   
77   
78   
79 }
80 EXTRA_OECONF += " --enable-dbus-type=p2p"
81
82 do_install() {
83  export RPM_BUILD_ROOT=${D}
84  cd ${S}
85  LANG=C
86  export LANG
87  unset DISPLAY
88  rm -rf ${D}
89  mkdir -p ${D}
90  
91  rm -rf ${D}
92  
93    oe_runmake \
94          DESTDIR=${D} \
95          INSTALL_ROOT=${D} \
96          BINDIR=${prefix}/bin \
97    install  
98    rm -f ${D}${infodir}/dir 
99    find ${D} -regex ".*\.la$" | xargs rm -f -- 
100    find ${D} -regex ".*\.a$" | xargs rm -f --
101  install -m 755 -d ${D}${prefix}/lib/systemd/user
102  install -m 644 data/gsignond.service ${D}${prefix}/lib/systemd/user/
103  install -m 755 -d ${D}${prefix}/lib/systemd/user/weston.target.wants
104  ln -s ../gsignond.service ${D}${prefix}/lib/systemd/user/weston.target.wants/gsignond.service
105  
106  
107 }
108
109 pkg_postinst_${PN}() {
110     #!/bin/sh -e
111
112     [ "x$D" == "x" ] && ldconfig
113     chmod u+s $D${prefix}/bin/gsignond
114     getent group gsignond > /dev/null || /usr/sbin/groupadd -r gsignond
115
116 }
117
118 pkg_postrm_${PN}() {
119     #!/bin/sh -e
120
121     [ "x$D" == "x" ] && ldconfig
122 }
123
124 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
125 PACKAGES += " gsignond "
126 PACKAGES += " gsignond-dev "
127
128 gsignond-doc_files = ""
129 gsignond-doc_files += "${prefix}/share/gtk-doc/html/gsignond/*"
130
131 gsignond_files = ""
132 gsignond_files += "AUTHORS COPYING.LIB INSTALL NEWS README"
133 gsignond_files += "${prefix}/bin/gsignond"
134 gsignond_files += "${prefix}/lib/libgsignond-*.so.*"
135 gsignond_files += "${prefix}/lib/gsignond/extensions/*.so*"
136 gsignond_files += "${prefix}/lib/gsignond/gplugins/*.so*"
137 gsignond_files += "${prefix}/lib/gsignond/pluginloaders/gsignond-plugind"
138 gsignond_files += "${prefix}/lib/systemd/user/gsignond.service"
139 gsignond_files += "${prefix}/lib/systemd/user/weston.target.wants/gsignond.service"
140 gsignond_files += "${sysconfdir}/gsignond.conf"
141 MANIFESTFILES_${PN} = "gsignond.manifest"
142
143 gsignond-dev_files = ""
144 gsignond-dev_files += "${prefix}/include/gsignond/*.h"
145 gsignond-dev_files += "${prefix}/lib/libgsignond-*.so"
146 gsignond-dev_files += "${prefix}/lib/pkgconfig/gsignond.pc"
147
148 FILES_${PN}-doc = "${gsignond-doc_files}"
149 FILES_${PN} = "${gsignond_files}"
150 FILES_${PN}-dev = "${gsignond-dev_files}"
151
152 PKG_gsignond-doc= "gsignond-doc"
153 PKG_gsignond= "gsignond"
154 PKG_gsignond-dev= "gsignond-dev"
155
156 require gsignond-extraconf.inc
157