summaryrefslogtreecommitdiff
path: root/packages/dbus-java/dbus-java_2.3.bb
blob: 71181d961d980ff973dbf9dd2d0253b2e13d8001 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
DESCRIPTION = "A pure Java D-Bus Implementation"
DESCRIPTION_dbus-java-viewer = "${DESCRIPTION} (DBusViewer Binary)"
DESCRIPTION_dbus-java-bin = "${DESCRIPTION} (Binaries)"

LICENSE = "GPLv2 AFL"
SECTION = "libs"
HOMEPAGE = "http://dbus.freedesktop.org/doc/dbus-java"
AUTHOR = "Matthew Johnson <dbus@matthew.ath.cx>"

PR = "r3"

inherit java-library

SRC_URI = "http://dbus.freedesktop.org/releases/dbus-java/dbus-java-${PV}.tar.gz"

S = "${WORKDIR}/dbus-java-${PV}"

DEPENDS = "libmatthew docbook-utils-native docbook-sgml-dtd-4.1-native fastjar-native"
RSUGGESTS_libdbus-java = "libmatthew-java dbus"
RDEPENDS_dbus-java-viewer = "java2-runtime libmatthew-java ${JPN}"
RDEPENDS_dbus-java-bin = "java2-runtime libmatthew-java ${JPN}"

do_compile () {
  # run target .binclasses first to fix a brokenness in the Makefile
	oe_runmake \
    JCFLAGS="-source 1.5" \
    JAVAC="javac" \
    JARPREFIX="${STAGING_DATADIR_JAVA}" \
    JAVAUNIXJARDIR="${STAGING_DATADIR_JAVA}" \
    CLASSPATH="${S}/classes" \
    JAR="fastjar" \
    .binclasses

	oe_runmake \
    JCFLAGS="-source 1.5" \
    JAVAC="javac" \
    JARPREFIX="${STAGING_DATADIR_JAVA}" \
    JAVAUNIXJARDIR="${STAGING_DATADIR_JAVA}" \
    CLASSPATH="${S}/classes" \
    JAR="fastjar" \
    all

  # Generated shell scripts will have staging paths inside them.
  rm bin/*

  # Generate them again with target paths.
  oe_runmake \
    JAVAC="oefatal \"No Java compilation expected here.\"" \
    JAR="oefatal \"No jar invocation expected here.\"" \
    JARPREFIX=${datadir_java} \
    JAVAUNIXPATH=${datadir_java} \
    all

  # Trigger generation of all documentation files to prevent this
  # being happen at the target 'install-man' in do_install.
  oe_runmake \
    JAVAC="oefatal \"No Java compilation expected here.\"" \
    JAR="oefatal \"No jar invocation expected here.\"" \
    JARPREFIX=${datadir_java} \
    JAVAUNIXPATH=${datadir_java} \
    CreateInterface.1 ListDBus.1 DBusDaemon.1 DBusViewer.1 changelog AUTHORS COPYING README INSTALL DBusCall.1
}

do_stage () {
  oe_jarinstall -s ${JPN}-${PV}.jar ${JPN}.jar
}

do_install () {
  oe_jarinstall ${JPN}-${PV}.jar ${JPN}.jar
  oe_jarinstall dbus-java-viewer-${PV}.jar dbus-java-viewer.jar
  oe_jarinstall dbus-java-bin-${PV}.jar dbus-java-bin.jar

  install -d ${D}${bindir}
  install bin/DBusViewer ${D}${bindir}
  install bin/DBusCall ${D}${bindir}
  install bin/CreateInterface ${D}${bindir}
  install bin/ListDBus ${D}${bindir}
  install bin/DBusDaemon ${D}${bindir}

  oe_runmake \
    JAVAC="oefatal \"No Java compilation expected here.\"" \
    JAR="oefatal \"No jar invocation expected here.\"" \
    MANPREFIX=${D}${mandir} \
    DOCPREFIX=${D}${docdir}/${JPN} \
    install-man
}

# ${JPN} must be last otherwise it would pick up dbus-viewer*.jar
# and dbus-bin*.jar
PACKAGES = "dbus-java-viewer dbus-java-viewer-doc dbus-java-bin dbus-java-bin-doc ${JPN}"

PACKAGE_ARCH = "all"

FILES_dbus-java-viewer = "${datadir}/java/dbus-java-viewer*.jar ${bindir}/DBusViewer"
FILES_dbus-java-viewer-doc = "${mandir}/DBusViewer*"
FILES_dbus-java-bin = "${datadir}/java/dbus-java-bin*.jar ${bindir}"
FILES_dbus-java-bin-doc = "${mandir} ${docdir}/${JPN}"