first commit
[scm/bb/meta-tizen.git] / recipes-tizen / expect / expect.inc
1 DESCRIPTION = "A Tool for Automating Interactive Programs"
2 HOMEPAGE = "http://expect.nist.gov"
3 SECTION = "Development/Languages/Tcl"
4 LICENSE = "SUSE-Public-Domain"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by expect-devel 
13 PROVIDES += "expect-devel"
14 RPROVIDES_expect-devel += "expect-devel"
15 RPROVIDES_expect-devel += "expect-dev"
16
17 #PROVIDES by expect 
18 PROVIDES += "expect"
19 RPROVIDES_expect += "expect"
20
21 RDEPENDS = ""
22
23 DEPENDS = ""
24 #DEPENDS of expect 
25 DEPENDS += "tcl-devel"
26 DEPENDS += "autoconf-native"
27
28 do_patch() {
29  chmod -Rf a+rX,u+w,g-w,o-w ${S}
30  #setup -q -n expect5.45
31  cp ${S}/packaging/expect.manifest .
32  
33  
34 }
35
36 do_configure() {
37 }
38
39 do_compile() {
40  LANG=C
41  export LANG
42  unset DISPLAY
43  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
44  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
45  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
46  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
47  
48  autoreconf
49  
50    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
51    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
52    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
53    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
54          --target=x86_64-tizen-linux \
55          --program-prefix= \
56          --prefix=/usr \
57          --exec-prefix=/usr \
58          --bindir=/usr/bin \
59          --sbindir=/usr/sbin \
60          --sysconfdir=/etc \
61          --datadir=/usr/share \
62          --includedir=/usr/include \
63          --libdir=/usr/lib \
64          --libexecdir=/usr/libexec \
65          --localstatedir=/var \
66          --sharedstatedir=/usr/com \
67          --mandir=/usr/share/man \
68          --infodir=/usr/share/info \
69         --with-tcl=/usr/lib \
70         --with-tk=no_tk \
71         --with-tclinclude=/usr/include \
72         --enable-shared
73  make -j16 all pkglibdir=/usr/lib/tcl/expect5.45
74  
75  
76  exit 0
77  make test
78  
79  
80  
81 }
82
83 do_install() {
84  echo export RPM_BUILD_ROOT=${D}
85  LANG=C
86  export LANG
87  unset DISPLAY
88  rm -rf ${D} 
89  mkdir -p ${D} 
90  
91  # set the right path to the expect binary...
92  sed -i \
93      -e '1s,^#![^ ]*expectk,#!/usr/bin/wish\npackage require Expect,' \
94      -e '1s,^#![^ ]*expect,#!/usr/bin/expect,' \
95      example/*
96  make install DESTDIR=$RPM_BUILD_ROOT pkglibdir=/usr/lib/tcl/expect5.45
97  # Remove some executables and manpages we don't want to ship
98  rm $RPM_BUILD_ROOT/usr/bin/*passwd
99  rm $RPM_BUILD_ROOT/usr/share/man/*/*passwd*
100  
101  
102 }
103
104 PACKAGES = ""
105 PACKAGES += "expect-devel"
106 PACKAGES += "expect"
107
108 expect-devel_files = ""
109 expect-devel_files += "expect.manifest"
110 expect-devel_files += "/usr/include/*"
111 expect-devel_files += "/usr/share/man/man3/*"
112
113 expect_files = ""
114 expect_files += "expect.manifest"
115 expect_files += "/usr/bin/*"
116 expect_files += "/usr/lib/tcl/*"
117 expect_files += "/usr/lib/lib*.so"
118 expect_files += "/usr/share/man/man1/*"
119
120 FILES_${PN}-devel = "${expect-devel_files}"
121 FILES_${PN} = "${expect_files}"
122
123 PKG_expect-devel= "expect-devel"
124 PKG_expect= "expect"
125
126 require expect-extraconf.inc