first commit
[scm/bb/meta-tizen.git] / recipes-tizen / buxton / buxton.inc
1 DESCRIPTION = "A security-enabled configuration system"
2 HOMEPAGE = "https://github.com/sofar/buxton"
3 SECTION = "System/Configuration"
4 LICENSE = "LGPL-2.1+"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by buxton-devel 
13 PROVIDES += "buxton-devel"
14 RPROVIDES_buxton-devel += "buxton-devel"
15 RPROVIDES_buxton-devel += "buxton-dev"
16
17 #PROVIDES by buxton-docs  
18 PROVIDES += "buxton-docs "
19 RPROVIDES_buxton-docs  += "buxton-docs "
20
21 #PROVIDES by buxton 
22 PROVIDES += "buxton"
23 RPROVIDES_buxton += "buxton"
24
25 RDEPENDS = ""
26 #RDEPENDS of buxton-devel (${PN}-devel)
27 RDEPENDS_${PN}-devel += "buxton"
28
29 #RDEPENDS of buxton (${PN})
30 RDEPENDS_${PN} += "/usr/bin/chown"
31 RDEPENDS_${PN} += "smack"
32 RDEPENDS_${PN} += "buxton"
33
34
35 DEPENDS = ""
36 #DEPENDS of buxton 
37 DEPENDS += "pkgconfig(systemd)"
38 DEPENDS += "pkgconfig(libsystemd-daemon)"
39 DEPENDS += "pkgconfig(check)"
40 DEPENDS += "attr"
41 DEPENDS += "gdbm-devel"
42
43 do_patch() {
44  chmod -Rf a+rX,u+w,g-w,o-w ${S}
45  #setup -q
46  cp ${S}/packaging/buxton.manifest .
47  
48  
49 }
50
51 do_configure() {
52 }
53
54 do_compile() {
55  LANG=C
56  export LANG
57  unset DISPLAY
58  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
59  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
60  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
61  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
62  
63  
64    CFLAGS="${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    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
68          --target=x86_64-tizen-linux \
69          --program-prefix= \
70          --prefix=/usr \
71          --exec-prefix=/usr \
72          --bindir=/usr/bin \
73          --sbindir=/usr/sbin \
74          --sysconfdir=/etc \
75          --datadir=/usr/share \
76          --includedir=/usr/include \
77          --libdir=/usr/lib \
78          --libexecdir=/usr/libexec \
79          --localstatedir=/var \
80          --sharedstatedir=/usr/com \
81          --mandir=/usr/share/man \
82          --infodir=/usr/share/info
83  make -j16
84  
85  
86  
87 }
88
89 do_install() {
90  echo export RPM_BUILD_ROOT=${D}
91  LANG=C
92  export LANG
93  unset DISPLAY
94  rm -rf ${D} 
95  mkdir -p ${D} 
96  
97  
98    oe_runmake \
99          DESTDIR=${D} \
100          INSTALL_ROOT=${D} \
101          BINDIR=/usr/bin \
102    install  
103    rm -f ${D}/usr/share/info/dir 
104    find ${D} -regex ".*\.la$" | xargs rm -f -- 
105    find ${D} -regex ".*\.a$" | xargs rm -f --
106  # TODO: need to define needed layers for Tizen in tizen.conf
107  install -m 0644 ${S}/packaging/tizen.conf ${D}/etc/buxton.conf
108  
109  
110 }
111
112 PACKAGES = ""
113 PACKAGES += "buxton-devel"
114 PACKAGES += "buxton-docs"
115 PACKAGES += "buxton"
116
117 buxton-devel_files = ""
118 buxton-devel_files += "buxton.manifest"
119 buxton-devel_files += "/usr/include/buxton.h"
120 buxton-devel_files += "/usr/lib/libbuxton.so"
121 buxton-devel_files += "/usr/lib/pkgconfig/*.pc"
122
123 buxton-docs_files = ""
124 buxton-docs_files += "/usr/share/info"
125 buxton-docs_files += "/usr/share/man"
126
127 buxton_files = ""
128 buxton_files += "buxton.manifest"
129 buxton_files += "/etc/buxton.conf"
130 buxton_files += "/usr/bin/buxtonctl"
131 buxton_files += "/usr/lib/buxton/*.so"
132 buxton_files += "/usr/lib/libbuxton.so.*"
133 buxton_files += "/usr/lib/systemd/system/buxton.service"
134 buxton_files += "/usr/lib/systemd/system/buxton.socket"
135 buxton_files += "/usr/lib/systemd/system/sockets.target.wants/buxton.socket"
136 buxton_files += "/usr/sbin/buxtond"
137
138 FILES_${PN}-devel = "${buxton-devel_files}"
139 FILES_${PN}-docs = "${buxton-docs_files}"
140 FILES_${PN} = "${buxton_files}"
141
142 PKG_buxton-devel= "buxton-devel"
143 PKG_buxton-docs= "buxton-docs"
144 PKG_buxton= "buxton"
145
146 require buxton-extraconf.inc