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.bb148
1 files changed, 148 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..ee594ba166
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
@@ -0,0 +1,148 @@
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 python-rpm"
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 file://smart-rpm4-fixes.patch \
36 file://smart-already-installed-message.patch \
37 "
38
39SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"
40SRC_URI[sha256sum] = "b1d519ddb43d60f293b065c28870a5d9e8b591cd49e8c68caea48ace91085eba"
41S = "${WORKDIR}/${SRCNAME}-${PV}"
42
43# Options - rpm, qt4, gtk
44PACKAGECONFIG ??= "rpm"
45
46RPM_RDEP = "${PN}-backend-rpm"
47QT_RDEP = "${PN}-interface-qt4"
48GTK_RDEP = "${PN}-interface-gtk"
49
50RPM_RDEP_class-native = ""
51QT_RDEP_class-native = ""
52GTK_RDEP_class-native = ""
53
54RPM_RDEP_class-nativesdk = ""
55QT_RDEP_class-nativesdk = ""
56GTK_RDEP_class-nativesdk = ""
57
58PACKAGECONFIG[rpm] = ",,rpm,${RPM_RDEP}"
59PACKAGECONFIG[qt4] = ",,qt4-x11,${QT_RDEP}"
60PACKAGECONFIG[gtk] = ",,gtk+,${GTK_RDEP}"
61
62inherit distutils
63
64do_install_append() {
65 # We don't support the following items
66 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/slack
67 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/arch
68 rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/qt
69
70 # Temporary, debian support in OE is missing the python module
71 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/aptchannelsync.py*
72 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/debdir.py*
73 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/deb
74
75 # Disable automatic channel detection
76 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/detectsys.py*
77
78 # Disable landscape support
79 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/landscape.py*
80
81 # Disable urpmi channel support
82 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/urpmichannelsync.py*
83
84 # Disable yum channel support
85 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/yumchannelsync.py*
86
87 # Disable zypper channel support
88 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/zyppchannelsync.py*
89
90 if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'rpm', 'rpm', '', d)}" ]; then
91 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/rpmdir.py*
92 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/rpm
93 fi
94
95 if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'qt4', 'qt4', '', d)}" ]; then
96 rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/qt4
97 fi
98
99 if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'gtk', '', d)}" ]; then
100 rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/gtk
101 fi
102}
103
104add_native_wrapper() {
105 create_wrapper ${D}/${bindir}/smart \
106 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
107 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
108 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
109}
110
111do_install_append_class-native() {
112 add_native_wrapper
113}
114
115do_install_append_class-nativesdk() {
116 add_native_wrapper
117}
118
119PACKAGES = "${PN}-dev ${PN}-dbg ${PN}-doc smartpm \
120 ${@bb.utils.contains('PACKAGECONFIG', 'rpm', '${PN}-backend-rpm', '', d)} \
121 ${@bb.utils.contains('PACKAGECONFIG', 'qt4', '${PN}-interface-qt4', '', d)} \
122 ${@bb.utils.contains('PACKAGECONFIG', 'gtk', '${PN}-interface-gtk', '', d)} \
123 ${PN}-interface-images ${PN}"
124
125RDEPENDS_smartpm = "${PN}"
126
127RDEPENDS_${PN} += "${PN}-backend-rpm python-codecs python-textutils python-xml python-fcntl \
128 python-pickle python-crypt python-compression python-shell \
129 python-resource python-netclient python-threading python-unixadmin python-pprint"
130RDEPENDS_${PN}_class-native = ""
131
132RDEPENDS_${PN}-backend-rpm = "python-rpm"
133
134RDEPENDS_${PN}-interface-qt4 = "qt4-x11 ${PN}-interface-images"
135RDEPENDS_${PN}-interface-gtk = "gtk+ ${PN}-interface-images"
136
137FILES_smartpm = "${bindir}/smart"
138
139FILES_${PN}-dbg += "${libdir}/python*/site-packages/smart/backends/rpm/.debug"
140
141FILES_${PN}-backend-rpm = "${libdir}/python*/site-packages/smart/backends/rpm"
142
143FILES_${PN}-interface-qt4 = "${libdir}/python*/site-packages/smart/interfaces/qt4"
144FILES_${PN}-interface-gtk = "${libdir}/python*/site-packages/smart/interfaces/gtk"
145FILES_${PN}-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images"
146
147BBCLASSEXTEND = "native nativesdk"
148