summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python-smartpm_1.4.1.bb')
-rw-r--r--meta/recipes-devtools/python/python-smartpm_1.4.1.bb146
1 files changed, 146 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
new file mode 100644
index 0000000000..464c5c5571
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
@@ -0,0 +1,146 @@
1SUMMARY = "The Smart Package Manager"
2DESCRIPTION = "The Smart Package Manager project has the ambitious objective of creating \
3smart and portable algorithms for solving adequately the problem of managing software \
4upgrades and installation."
5
6HOMEPAGE = "http://labix.org/smart/"
7SECTION = "devel/python"
8LICENSE = "GPLv2"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
10
11DEPENDS = "python rpm gettext-native"
12PR = "r9"
13SRCNAME = "smart"
14
15SRC_URI = "\
16 http://launchpad.net/smart/trunk/${PV}/+download/${SRCNAME}-${PV}.tar.bz2 \
17 file://smartpm-rpm5-nodig.patch \
18 file://smart-rpm-root.patch \
19 file://smart-recommends.patch \
20 file://smart-rpm-extra-macros.patch \
21 file://smart-dflags.patch \
22 file://smart-rpm-md-parse.patch \
23 file://smart-tmpdir.patch \
24 file://smart-metadata-match.patch \
25 file://smart-improve-error-reporting.patch \
26 file://smart-multilib-fixes.patch \
27 file://smart-yaml-error.patch \
28 file://smart-channelsdir.patch \
29 file://smart-conflict-provider.patch \
30 file://smart-flag-ignore-recommends.patch \
31 file://smart-flag-exclude-packages.patch \
32 file://smart-config-ignore-all-recommends.patch \
33 file://smart-attempt.patch \
34 file://smart-filename-NAME_MAX.patch \
35 "
36
37SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"
38SRC_URI[sha256sum] = "b1d519ddb43d60f293b065c28870a5d9e8b591cd49e8c68caea48ace91085eba"
39S = "${WORKDIR}/${SRCNAME}-${PV}"
40
41# Options - rpm, qt4, gtk
42PACKAGECONFIG ??= "rpm"
43
44RPM_RDEP = "${PN}-backend-rpm"
45QT_RDEP = "${PN}-interface-qt4"
46GTK_RDEP = "${PN}-interface-gtk"
47
48RPM_RDEP_class-native = ""
49QT_RDEP_class-native = ""
50GTK_RDEP_class-native = ""
51
52RPM_RDEP_class-nativesdk = ""
53QT_RDEP_class-nativesdk = ""
54GTK_RDEP_class-nativesdk = ""
55
56PACKAGECONFIG[rpm] = ",,rpm,${RPM_RDEP}"
57PACKAGECONFIG[qt4] = ",,qt4-x11,${QT_RDEP}"
58PACKAGECONFIG[gtk] = ",,gtk+,${GTK_RDEP}"
59
60inherit distutils
61
62do_install_append() {
63 # We don't support the following items
64 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/slack
65 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/arch
66 rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/qt
67
68 # Temporary, debian support in OE is missing the python module
69 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/aptchannelsync.py*
70 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/debdir.py*
71 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/deb
72
73 # Disable automatic channel detection
74 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/detectsys.py*
75
76 # Disable landscape support
77 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/landscape.py*
78
79 # Disable urpmi channel support
80 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/urpmichannelsync.py*
81
82 # Disable yum channel support
83 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/yumchannelsync.py*
84
85 # Disable zypper channel support
86 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/zyppchannelsync.py*
87
88 if [ -z "${@base_contains('PACKAGECONFIG', 'rpm', 'rpm', '', d)}" ]; then
89 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/rpmdir.py*
90 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/rpm
91 fi
92
93 if [ -z "${@base_contains('PACKAGECONFIG', 'qt4', 'qt4', '', d)}" ]; then
94 rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/qt4
95 fi
96
97 if [ -z "${@base_contains('PACKAGECONFIG', 'gtk+', 'gtk', '', d)}" ]; then
98 rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/gtk
99 fi
100}
101
102add_native_wrapper() {
103 create_wrapper ${D}/${bindir}/smart \
104 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
105 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
106 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
107}
108
109do_install_append_class-native() {
110 add_native_wrapper
111}
112
113do_install_append_class-nativesdk() {
114 add_native_wrapper
115}
116
117PACKAGES = "${PN}-dev ${PN}-dbg ${PN}-doc smartpm \
118 ${@base_contains('PACKAGECONFIG', 'rpm', '${PN}-backend-rpm', '', d)} \
119 ${@base_contains('PACKAGECONFIG', 'qt4', '${PN}-interface-qt4', '', d)} \
120 ${@base_contains('PACKAGECONFIG', 'gtk', '${PN}-interface-gtk', '', d)} \
121 ${PN}-interface-images ${PN}"
122
123RDEPENDS_smartpm = "${PN}"
124
125RDEPENDS_${PN} += "${PN}-backend-rpm python-codecs python-textutils python-xml python-fcntl \
126 python-pickle python-crypt python-compression python-shell \
127 python-resource python-netclient python-threading python-unixadmin python-pprint"
128RDEPENDS_${PN}_class-native = ""
129
130RDEPENDS_${PN}-backend-rpm = "python-rpm"
131
132RDEPENDS_${PN}-interface-qt4 = "qt4-x11 ${PN}-interface-images"
133RDEPENDS_${PN}-interface-gtk = "gtk+ ${PN}-interface-images"
134
135FILES_smartpm = "${bindir}/smart"
136
137FILES_${PN}-dbg += "${libdir}/python*/site-packages/smart/backends/rpm/.debug"
138
139FILES_${PN}-backend-rpm = "${libdir}/python*/site-packages/smart/backends/rpm"
140
141FILES_${PN}-interface-qt4 = "${libdir}/python*/site-packages/smart/interfaces/qt4"
142FILES_${PN}-interface-gtk = "${libdir}/python*/site-packages/smart/interfaces/gtk"
143FILES_${PN}-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images"
144
145BBCLASSEXTEND = "native nativesdk"
146