diff options
author | Nicolas Ferre <nicolasfr@gmail.com> | 2006-12-03 21:35:16 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2006-12-03 21:35:16 +0000 |
commit | 576d10a0f51634cf0c673db85b3b7293e45c32ef (patch) | |
tree | 5a29239731ac87b9b16cbdb95e50c1816f18224e /packages | |
parent | 22c9eea35a98e1c2dd2d413f4066e88277b6c1cb (diff) |
python-pywpa: added 0.3.4 - close #1639
Diffstat (limited to 'packages')
-rw-r--r-- | packages/python/python-pywpa-0.3.4/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/python/python-pywpa-0.3.4/Makefile | 28 | ||||
-rw-r--r-- | packages/python/python-pywpa-0.3.4/Makefile.wpactrl | 8 | ||||
-rw-r--r-- | packages/python/python-pywpa_0.3.4.bb | 49 |
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" |