Add weston
[scm/bb/tizen.git] / meta-tizen-generic / recipes-tizen / smack / smack.inc
1 DESCRIPTION = "Selection of tools for developers working with Smack"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Security/Access Control"
4 LICENSE = "LGPL-2.1"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 inherit autotools-brokensep
11
12 PROVIDES = ""
13
14 #PROVIDES by smack-dev 
15
16
17 #PROVIDES by smack 
18
19
20 #PROVIDES by libsmack 
21
22
23 #PROVIDES by smack-docs  
24
25
26 RDEPENDS = ""
27 #RDEPENDS of smack-dev (${PN}-dev)
28 RDEPENDS_${PN}-dev += "libsmack"
29
30
31 DEPENDS = ""
32 #DEPENDS of smack 
33 DEPENDS_append_class-native = " autoconf-native"
34 DEPENDS_append_class-target = " autoconf"
35 DEPENDS += "libtool-cross"
36 DEPENDS_append_class-native = " automake-native"
37 DEPENDS_append_class-target = " automake"
38
39 do_prep() {
40  cd ${S}
41  chmod -Rf a+rX,u+w,g-w,o-w ${S}
42  #setup -q
43  cp ${S}/packaging/smack.manifest .
44  
45  
46 }
47 do_patch_append() {
48     bb.build.exec_func('do_prep', d)
49 }
50
51 do_configure() {
52 }
53
54 do_compile() {
55  cd ${S}
56  LANG=C
57  export LANG
58  unset DISPLAY
59  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
60  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
61  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
62  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
63  
64  
65    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
66    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
67    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
68    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
69          --target=x86_64-tizen-linux \
70          --program-prefix= \
71          --prefix=${prefix} \
72          --exec-prefix=${prefix} \
73          --bindir=${prefix}/bin \
74          --sbindir=${prefix}/sbin \
75          --sysconfdir=${sysconfdir} \
76          --datadir=${prefix}/share \
77          --includedir=${prefix}/include \
78          --libdir=${prefix}/lib \
79          --libexecdir=${prefix}/libexec \
80          --localstatedir=${localstatedir} \
81          --sharedstatedir=${prefix}/com \
82          --mandir=${mandir} \
83          --infodir=${infodir} --with-systemdsystemunitdir=/lib/systemd/system
84  
85  make -j16
86  
87  
88  
89 }
90
91 do_install() {
92  echo export RPM_BUILD_ROOT=${D}
93  cd ${S}
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=${prefix}/bin \
105    install  
106    rm -f ${D}${infodir}/dir 
107    find ${D} -regex ".*\.la$" | xargs rm -f -- 
108    find ${D} -regex ".*\.a$" | xargs rm -f --
109  install -d ${D}${sysconfdir}/smack/accesses.d
110  install -d ${D}${sysconfdir}/smack/cipso.d
111  install -d ${D}${sysconfdir}/smack/netlabel.d
112  
113  
114 }
115
116 PACKAGES += " libsmack "
117 PACKAGES += " smack-docs "
118
119 smack-dev_files = ""
120 smack-dev_files += "smack.manifest"
121 smack-dev_files += "${prefix}/include/sys/smack.h"
122 smack-dev_files += "${prefix}/lib/libsmack.so"
123 smack-dev_files += "${prefix}/lib/pkgconfig/libsmack.pc"
124
125 smack_files = ""
126 smack_files += "smack.manifest"
127 smack_files += "${sysconfdir}/smack"
128 smack_files += "${sysconfdir}/smack/accesses.d"
129 smack_files += "${sysconfdir}/smack/cipso.d"
130 smack_files += "${sysconfdir}/smack/netlabel.d"
131 smack_files += "${prefix}/bin/*"
132
133 libsmack_files = ""
134 libsmack_files += "smack.manifest"
135 libsmack_files += "${prefix}/lib/libsmack.so.*"
136
137 smack-docs_files = ""
138
139 FILES_${PN}-dev = "${smack-dev_files}"
140 FILES_${PN} = "${smack_files}"
141 FILES_lib${PN} = "${libsmack_files}"
142 FILES_${PN}-docs = "${smack-docs_files}"
143
144 PKG_smack-dev= "smack-dev"
145 PKG_smack= "smack"
146 PKG_libsmack= "libsmack"
147 PKG_smack-docs= "smack-docs"
148
149 require smack-extraconf.inc
150