first commit
[scm/bb/meta-tizen.git] / recipes-tizen / usb-manager / usb-manager.inc
1 DESCRIPTION = "USB server"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "framework/system"
4 LICENSE = "Apache License, Version 2.0"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by usb-server 
13 PROVIDES += "usb-server"
14 RPROVIDES_usb-server += "usb-server"
15
16 RDEPENDS = ""
17
18 DEPENDS = ""
19 #DEPENDS of usb-server 
20 DEPENDS += "systemd"
21 DEPENDS += "app-svc"
22 DEPENDS += "cmake"
23 DEPENDS += "attr"
24 DEPENDS += "pkgconfig(capi-system-usb-accessory)"
25 DEPENDS += "dlog"
26 DEPENDS += "notification"
27 DEPENDS += "syspopup"
28 #Replace "DEPENDS" on gettext by "inherit gettext"
29 inherit gettext
30 DEPENDS += "app-core"
31 DEPENDS += "system-server"
32 DEPENDS += "pkgconfig(libusb-1.0)"
33 DEPENDS += "pkgconfig(vconf)"
34 DEPENDS += "pkgconfig(edbus)"
35 DEPENDS += "ecore"
36 DEPENDS += "devman"
37
38 do_patch() {
39  chmod -Rf a+rX,u+w,g-w,o-w ${S}
40  #setup -q
41  
42  cmake . -DCMAKE_INSTALL_PREFIX=/usr -DSIMULATOR=no
43  
44  
45  
46 }
47
48 do_configure() {
49 }
50
51 do_compile() {
52  LANG=C
53  export LANG
54  unset DISPLAY
55  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
56  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
57  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
58  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
59  
60  cp ${S}/packaging/usb-server.manifest .
61  cp ${S}/packaging/usb-server.rule .
62  make -j16
63  
64  
65  
66 }
67
68 do_install() {
69  echo export RPM_BUILD_ROOT=${D}
70  LANG=C
71  export LANG
72  unset DISPLAY
73  rm -rf ${D} 
74  mkdir -p ${D} 
75  
76  rm -rf ${D}
77  
78    oe_runmake \
79          DESTDIR=${D} \
80          INSTALL_ROOT=${D} \
81          BINDIR=/usr/bin \
82    install  
83    rm -f ${D}/usr/share/info/dir 
84    find ${D} -regex ".*\.la$" | xargs rm -f -- 
85    find ${D} -regex ".*\.a$" | xargs rm -f --
86  
87  
88 }
89
90 PACKAGES = ""
91 PACKAGES += "usb-server"
92
93 usb-server_files = ""
94 usb-server_files += "usb-server.manifest"
95 usb-server_files += "/usr/bin/start_dr.sh"
96 usb-server_files += "/usr/bin/usb-server"
97 usb-server_files += "/usr/bin/direct_set_debug.sh"
98 usb-server_files += "/usr/bin/set_usb_debug.sh"
99
100 FILES_${PN} = "${usb-server_files}"
101
102 PKG_usb-server= "usb-server"
103
104 require usb-manager-extraconf.inc