first commit
[scm/bb/meta-tizen.git] / recipes-tizen / sgml-skel / sgml-skel.inc
1 DESCRIPTION = "Helper Scripts for the SGML System"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Productivity/Publishing/SGML"
4 LICENSE = "GPL-2.0+"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by sgml-skel 
13 PROVIDES += "sgml-skel"
14 RPROVIDES_sgml-skel += "sgml-skel"
15
16 RDEPENDS = ""
17 #RDEPENDS of sgml-skel (${PN})
18 RDEPENDS_${PN} += "libxml2-tools"
19 RDEPENDS_${PN} += "/usr/bin/mv"
20 RDEPENDS_${PN} += "/usr/bin/awk"
21 RDEPENDS_${PN} += "/usr/bin/chmod"
22
23
24 DEPENDS = ""
25 #DEPENDS of sgml-skel 
26 DEPENDS += "libxml2"
27 DEPENDS += "automake-native"
28
29 do_patch() {
30  chmod -Rf a+rX,u+w,g-w,o-w ${S}
31  #setup -q
32  cp ${S}/packaging/sgml-skel.manifest .
33  cp ${S}/packaging/install-catalog.in .
34  cp ${S}/packaging/edit-xml-catalog.sh .
35  
36  
37 }
38
39 do_configure() {
40 }
41
42 do_compile() {
43  LANG=C
44  export LANG
45  unset DISPLAY
46  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
47  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
48  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
49  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
50  
51  # CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables"
52  autoreconf -i -f
53  ./configure --prefix=/usr --infodir=/usr/share/info \
54    --datadir=/usr/share --mandir=/usr/share/man \
55    --build $RPM_ARCH-tizen-linux
56  
57  
58  
59 }
60
61 do_install() {
62  echo export RPM_BUILD_ROOT=${D}
63  LANG=C
64  export LANG
65  unset DISPLAY
66  rm -rf ${D} 
67  mkdir -p ${D} 
68  
69  
70    oe_runmake \
71          DESTDIR=${D} \
72          INSTALL_ROOT=${D} \
73          BINDIR=/usr/bin \
74    install  
75    rm -f ${D}/usr/share/info/dir 
76    find ${D} -regex ".*\.la$" | xargs rm -f -- 
77    find ${D} -regex ".*\.a$" | xargs rm -f --
78  install -m755 install-catalog.in ${D}/usr/bin/install-catalog
79  install -m755 edit-xml-catalog.sh \
80    ${D}/usr/bin/edit-xml-catalog
81  ln -sf sgml2xmlcat.sh ${D}/usr/bin/sgmlcat2x.sh
82  ln -sf install-catalog ${D}/usr/bin/install-catalog.sh
83  install -d -m755 ${D}/usr/share/sgml
84  install -d -m755 ${D}/etc/{sgml,xml}
85  install -d -m755 ${D}/var/lib/sgml
86  touch ${D}/etc/sgml/catalog
87  xmlcatalog --noout --create ${D}/etc/xml/tizen-catalog.xml
88  xmlcatalog --noout --create ${D}/etc/xml/catalog
89  xmlcatalog --noout --add  "nextCatalog" "tizen-catalog.xml" "tizen-catalog.xml" \
90    ${D}/etc/xml/catalog
91  
92  
93 }
94
95 PACKAGES = ""
96 PACKAGES += "sgml-skel"
97
98 sgml-skel_files = ""
99 sgml-skel_files += "sgml-skel.manifest"
100 sgml-skel_files += "AUTHORS COPYING NEWS README*"
101 sgml-skel_files += "%verify(not md5 size mtime) /etc/xml/catalog"
102 sgml-skel_files += "/etc/sgml"
103 sgml-skel_files += "/etc/xml"
104 sgml-skel_files += "/usr/bin/*"
105 sgml-skel_files += "/var/lib/sgml"
106
107 FILES_${PN} = "${sgml-skel_files}"
108
109 PKG_sgml-skel= "sgml-skel"
110
111 require sgml-skel-extraconf.inc