first commit
[scm/bb/meta-tizen.git] / recipes-tizen / crda / crda.inc
1 DESCRIPTION = "Linux central regulatory domain agent"
2 HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/"
3 SECTION = "System/Base"
4 LICENSE = "ISC"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by crda-docs  
13 PROVIDES += "crda-docs "
14 RPROVIDES_crda-docs  += "crda-docs "
15
16 #PROVIDES by crda 
17 PROVIDES += "crda"
18 RPROVIDES_crda += "crda"
19
20 RDEPENDS = ""
21 #RDEPENDS of crda (${PN})
22 RDEPENDS_${PN} += "libnl"
23 RDEPENDS_${PN} += "libgcrypt"
24
25
26 DEPENDS = ""
27 #DEPENDS of crda 
28 DEPENDS += "libnl-devel"
29 DEPENDS += "gcc-cross"
30 DEPENDS += "python-M2Crypto"
31 DEPENDS += "libgcrypt-devel"
32 DEPENDS += "wireless-regdb"
33
34 do_patch() {
35  chmod -Rf a+rX,u+w,g-w,o-w ${S}
36  #setup -q
37  cp ${S}/packaging/crda.manifest .
38  
39  
40 }
41
42 do_configure() {
43 }
44
45 do_compile() {
46  LANG=C
47  export LANG
48  unset DISPLAY
49  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
50  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
51  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
52  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
53  
54  make DESTDIR=${D} UDEV_RULE_DIR=/usr/lib/udev/rules.d SBINDIR=/usr/sbin
55  
56  
57  
58 }
59
60 do_install() {
61  echo export RPM_BUILD_ROOT=${D}
62  LANG=C
63  export LANG
64  unset DISPLAY
65  rm -rf ${D} 
66  mkdir -p ${D} 
67  
68  
69    oe_runmake \
70          DESTDIR=${D} \
71          INSTALL_ROOT=${D} \
72          BINDIR=/usr/bin \
73    install  
74    rm -f ${D}/usr/share/info/dir 
75    find ${D} -regex ".*\.la$" | xargs rm -f -- 
76    find ${D} -regex ".*\.a$" | xargs rm -f -- UDEV_RULE_DIR=/usr/lib/udev/rules.d SBINDIR=/usr/sbin
77  
78  
79  
80 }
81
82 PACKAGES = ""
83 PACKAGES += "crda"
84 PACKAGES += "crda-docs"
85
86 crda_files = ""
87 crda_files += "crda.manifest"
88 crda_files += "/usr/sbin/crda"
89 crda_files += "/usr/sbin/regdbdump"
90 crda_files += "/usr/lib/udev/rules.d/85-regulatory.rules"
91
92 crda-docs_files = ""
93 crda-docs_files += "/usr/share/info"
94 crda-docs_files += "/usr/share/man"
95
96 FILES_${PN} = "${crda_files}"
97 FILES_${PN}-docs = "${crda-docs_files}"
98
99 PKG_crda= "crda"
100 PKG_crda-docs= "crda-docs"
101
102 require crda-extraconf.inc