summaryrefslogtreecommitdiff
path: root/packages/python
diff options
context:
space:
mode:
Diffstat (limited to 'packages/python')
-rw-r--r--packages/python/python-pywpa-0.3.4/.mtn2git_empty0
-rw-r--r--packages/python/python-pywpa-0.3.4/Makefile28
-rw-r--r--packages/python/python-pywpa-0.3.4/Makefile.wpactrl8
-rw-r--r--packages/python/python-pywpa_0.3.4.bb49
4 files changed, 85 insertions, 0 deletions
diff --git a/packages/python/python-pywpa-0.3.4/.mtn2git_empty b/packages/python/python-pywpa-0.3.4/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/python/python-pywpa-0.3.4/.mtn2git_empty
diff --git a/packages/python/python-pywpa-0.3.4/Makefile b/packages/python/python-pywpa-0.3.4/Makefile
new file mode 100644
index 0000000000..0206f1c229
--- /dev/null
+++ b/packages/python/python-pywpa-0.3.4/Makefile
@@ -0,0 +1,28 @@
+# Simple Makefile
+
+NAME = pywpa/_pywpa
+CFLAGS += -Iwpactrl
+OBJS = pywpa.o
+
+%.o: %.c
+ @echo "Compiling $(<)"
+ @$(CC) $(CFLAGS) -c $(<) -o $(@)
+
+$(NAME).so: objects libwpactrl
+ @echo "Statically Linking $(NAME)"
+ @$(CC) $(CFLAGS) $(OBJS) wpactrl/wpa_ctrl.o -shared -o $(NAME).so
+
+main: objects libwpactrl
+ @echo "Creating test"
+ @$(CC) $(CFLAGS) $(OBJS) wpactrl/wpa_ctrl.o -o test -lpython2.4
+
+objects: $(OBJS)
+
+libwpactrl:
+ @make -C wpactrl > /dev/null
+
+clean:
+ @rm -rf *.o
+ @rm -rf $(NAME).so
+ @rm -rf $(NAME).so.t*
+ @make -C wpactrl clean 2>/dev/null
diff --git a/packages/python/python-pywpa-0.3.4/Makefile.wpactrl b/packages/python/python-pywpa-0.3.4/Makefile.wpactrl
new file mode 100644
index 0000000000..b956e0e015
--- /dev/null
+++ b/packages/python/python-pywpa-0.3.4/Makefile.wpactrl
@@ -0,0 +1,8 @@
+# Simple Makefile
+
+libwpa: wpa_ctrl.c wpa_ctrl.h
+ @echo "Building our small WPA Control Library..."
+ $(CC) -c -W -Wall -g wpa_ctrl.c
+
+clean:
+ @rm -rf *.o
diff --git a/packages/python/python-pywpa_0.3.4.bb b/packages/python/python-pywpa_0.3.4.bb
new file mode 100644
index 0000000000..e8886625b6
--- /dev/null
+++ b/packages/python/python-pywpa_0.3.4.bb
@@ -0,0 +1,49 @@
+DESCRIPTION = "PyWPA is another Python extension module written in C \
+ that interfaces with wpa_supplicant"
+HOMEPAGE = "http://www.emperorlinux.com/etc/contrib/?page=pywpa"
+SECTION = "devel/python"
+PRIORITY = "optional"
+LICENSE = "GPL"
+RDEPENDS = "python-core"
+PR = "ml0"
+
+SRC_URI = "http://downloads.emperorlinux.com/contrib/pywpa/pywpa-${PV}.tbz2 \
+ file://Makefile \
+ file://Makefile.wpactrl"
+
+S="${WORKDIR}/pywpa-${PV}"
+
+do_unpack_real () {
+ tar jxvf pywpa-${PV}.tbz2
+ cp Makefile pywpa-${PV}/
+ cp Makefile.wpactrl pywpa-${PV}/wpactrl/Makefile
+}
+do_unpack_real[dirs] = "${WORKDIR}"
+addtask unpack_real before do_patch after do_unpack
+
+inherit autotools pkgconfig distutils-base
+
+CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR}"
+
+do_compile() {
+ cd ${S}/wpactrl
+ oe_runmake HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ OPT="${CFLAGS}"
+ cd ${S}
+ oe_runmake HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ OPT="${CFLAGS}"
+}
+
+do_install() {
+ install -d ${D}${libdir}/${PYTHON_DIR}/site-packages/pywpa
+ install -m 0755 pywpa/__init__.py ${D}${libdir}/${PYTHON_DIR}/site-packages/pywpa/__init__.py
+ install -m 0755 pywpa/_pywpa.so ${D}${libdir}/${PYTHON_DIR}/site-packages/pywpa/_pywpa.so
+}
+
+FILES_${PN} = "${libdir}/${PYTHON_DIR}/site-packages/pywpa/__init__.py ${libdir}/${PYTHON_DIR}/site-packages/pywpa/_pywpa.so"