]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Made the python modules in one file per module.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 9 Jul 2008 12:08:32 +0000 (12:08 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 9 Jul 2008 12:08:32 +0000 (12:08 +0000)
lfs/python-dbus [moved from lfs/python-modules with 58% similarity]
lfs/python-iconv [new file with mode: 0644]
lfs/python-parted [new file with mode: 0644]
lfs/python-urlgrabber [new file with mode: 0644]
make.sh

similarity index 58%
rename from lfs/python-modules
rename to lfs/python-dbus
index 56a412cf6999d36981f2d69fba8a58c6374ac54f..949d0a8b4f06f88c29adbffbd390af605bb0b09f 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2008  Michael Tremer & Christian Schmidt                      #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
 
 include Config
 
-PKG_NAME   = python-modules
-VER        = ipfire
+PKG_NAME   = dbus-python
+VER        = 0.82.4
 
 THISAPP    = $(PKG_NAME)-$(VER)
-ICONV      = iconvmodule-1.0-ipfire-1
-DBUSPY     = dbus-python-0.82.4
-URLGRABBER = urlgrabber-3.1.0
-PYPARTED   = pyparted-1.8.9
+DL_FILE    = $(THISAPP).tar.gz
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
 
 TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
 
-DIR_MOD    = $(DIR_SRC)/$(THISAPP)
-MODULES    = $(DIR_SRC)/$(ICONV) $(DIR_SRC)/$(DBUSPY) $(DIR_SRC)/$(URLGRABBER)
-
-ifeq "$(STAGE)" "$(SNAME)"
-       DIR_DEST =
-       EXTRA_CONF =
-       EXTRA_LIBS =
-       EXTRA_CMD =
-else
-       DIR_DEST = $(INSTALLER_DIR)
-       EXTRA_CONF = --host=$(UCLIBC_TARGET)
-       PYTHONHOME = PYTHONHOME=$(INSTALLER_DIR)/usr
-       EXTRA_LIBS = DBUS_CFLAGS="-I$(INSTALLER_DIR)/usr/include/dbus-1.0 -I$(INSTALLER_DIR)/usr/lib/dbus-1.0/include" \
-               DBUS_LIBS="$(INSTALLER_DIR)/usr/lib/libdbus-1.so" \
-               DBUS_GLIB_CFLAGS="-I$(INSTALLER_DIR)/usr/include/glib-2.0 -I$(INSTALLER_DIR)/usr/lib/glib-2.0/include" \
-               DBUS_GLIB_LIBS="$(INSTALLER_DIR)/usr/lib/libglib-2.0.so $(INSTALLER_DIR)/usr/lib/libgobject-2.0.so $(INSTALLER_DIR)/usr/lib/libgmodule-2.0.so $(INSTALLER_DIR)/usr/lib/libgthread-2.0.so" \
-               LIBS="$(INSTALLER_DIR)/usr/lib/libdbus-1.so" \
-               LDFLAGS="-L$(INSTALLER_DIR)/lib/ -L$(INSTALLER_DIR)/usr/lib/ -ldbus-1 $(INSTALLER_DIR)/usr/lib/libdbus-1.so"
-       EXTRA_CMD = sed -e "s@^PYTHON_INCLUDES = .*@PYTHON_INCLUDES = -I$(INSTALLER_DIR)/usr/include/python2.5@g" \
-               -i $(DIR_MOD)/$(DBUSPY)/{.,_dbus_{,glib_}bindings}/Makefile
-endif
-
 ###############################################################################
 # Top-level Rules
 ###############################################################################
 
-objects = $(ICONV).tar.bz2 \
-       $(DBUSPY).tar.gz \
-       $(URLGRABBER).tar.gz \
-       $(PYPARTED).tar.bz2
+objects = $(DL_FILE)
 
 install: $(TARGET)
 
@@ -77,50 +50,32 @@ $(objects) :
 # Installation Details
 ###############################################################################
 
-define MAKE_ICONV
-       cd $(DIR_MOD) && tar jxf $(DIR_DL)/$(ICONV).tar.bz2
-       cd $(DIR_MOD)/$(ICONV) && \
-               $(PYTHONHOME) \
-               make install DESTDIR=$(DIR_DEST)
-endef
-
-define MAKE_DBUSPY
-       cd $(DIR_MOD) && tar zxf $(DIR_DL)/$(DBUSPY).tar.gz
-       cd $(DIR_MOD)/$(DBUSPY) && $(EXTRA_LIBS) \
-               ./configure --prefix=/usr $(EXTRA_CONF)
-       $(EXTRA_CMD)
-       cd $(DIR_MOD)/$(DBUSPY) && make $(PARALLELISMFLAGS)
-       cd $(DIR_MOD)/$(DBUSPY) && make install DESTDIR=$(DIR_DEST)
-endef
-
-define MAKE_URLGRABBER
-       cd $(DIR_MOD) && tar zxf $(DIR_DL)/$(URLGRABBER).tar.gz
-       cd $(DIR_MOD)/$(URLGRABBER) && DESTDIR=$(DIR_DEST) python setup.py install
-endef
-
-define MAKE_PYPARTED
-       cd $(DIR_MOD) && tar jxf $(DIR_DL)/$(PYPARTED).tar.bz2
-       cd $(DIR_MOD)/$(PYPARTED) && $(U_TOOLS) \
-               $(PYTHONHOME) \
-               make all install \
-               libdir=$(INSTALLER_DIR)/usr/lib/python2.5/site-packages
-endef
-
 $(TARGET):
        @$(PREBUILD)
-       @rm -rf $(DIR_MOD)
-       @mkdir -p $(DIR_MOD)
-
-       $(MAKE_DBUSPY)
-       $(MAKE_ICONV)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
 
 ifeq "$(STAGE)" "$(SNAME)"
-       $(MAKE_URLGRABBER)
+       cd $(DIR_APP) && ./configure --prefix=/usr
+       cd $(DIR_APP) && make $(PARALLELISMFLAGS)
+       cd $(DIR_APP) && make install
 endif
 
 ifeq "$(STAGE)" "installer"
-       $(MAKE_PYPARTED)
+       cd $(DIR_APP) && \
+               DBUS_CFLAGS="-I$(INSTALLER_DIR)/usr/include/dbus-1.0 -I$(INSTALLER_DIR)/usr/lib/dbus-1.0/include" \
+               DBUS_LIBS="$(INSTALLER_DIR)/usr/lib/libdbus-1.so" \
+               DBUS_GLIB_CFLAGS="-I$(INSTALLER_DIR)/usr/include/glib-2.0 -I$(INSTALLER_DIR)/usr/lib/glib-2.0/include" \
+               DBUS_GLIB_LIBS="$(INSTALLER_DIR)/usr/lib/libglib-2.0.so $(INSTALLER_DIR)/usr/lib/libgobject-2.0.so $(INSTALLER_DIR)/usr/lib/libgmodule-2.0.so $(INSTALLER_DIR)/usr/lib/libgthread-2.0.so" \
+               LIBS="$(INSTALLER_DIR)/usr/lib/libdbus-1.so" \
+               LDFLAGS="-L$(INSTALLER_DIR)/lib/ -L$(INSTALLER_DIR)/usr/lib/ -ldbus-1 $(INSTALLER_DIR)/usr/lib/libdbus-1.so" \
+               ./configure \
+                       --prefix=/usr \
+                       --host=$(UCLIBC_TARGET)
+       sed -e "s@^PYTHON_INCLUDES = .*@PYTHON_INCLUDES = -I$(INSTALLER_DIR)/usr/include/python2.5@g" \
+               -i $(DIR_APP)/{.,_dbus_{,glib_}bindings}/Makefile
+       cd $(DIR_APP) && make $(PARALLELISMFLAGS)
+       cd $(DIR_APP) && make install DESTDIR=$(INSTALLER_DIR)
 endif
 
-       @rm -rf $(DIR_MOD)
+       @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/lfs/python-iconv b/lfs/python-iconv
new file mode 100644 (file)
index 0000000..df35771
--- /dev/null
@@ -0,0 +1,68 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2008  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+PKG_NAME   = iconvmodule
+VER        = 1.0-ipfire-1
+
+THISAPP    = $(PKG_NAME)-$(VER)
+DL_FILE    = $(THISAPP).tar.bz2
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+
+TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+install: $(TARGET)
+
+download : $(objects)
+
+$(objects) :
+       @$(LOAD)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET):
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+
+ifeq "$(STAGE)" "$(SNAME)"
+       cd $(DIR_APP) && make install
+endif
+
+ifeq "$(STAGE)" "installer"
+       cd $(DIR_APP) && \
+               PYTHONHOME=$(INSTALLER_DIR)/usr \
+               make install DESTDIR=$(INSTALLER_DIR)
+endif
+
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
diff --git a/lfs/python-parted b/lfs/python-parted
new file mode 100644 (file)
index 0000000..e8f5085
--- /dev/null
@@ -0,0 +1,61 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2008  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+PKG_NAME   = pyparted
+VER        = 1.8.9
+
+THISAPP    = $(PKG_NAME)-$(VER)
+DL_FILE    = $(THISAPP).tar.bz2
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+
+TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+install: $(TARGET)
+
+download : $(objects)
+
+$(objects) :
+       @$(LOAD)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET):
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) &&  $(U_TOOLS) \
+               PYTHONHOME=$(INSTALLER_DIR)/usr \
+               make all install \
+               libdir=$(INSTALLER_DIR)/usr/lib/python2.5/site-packages
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
diff --git a/lfs/python-urlgrabber b/lfs/python-urlgrabber
new file mode 100644 (file)
index 0000000..71c1565
--- /dev/null
@@ -0,0 +1,66 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2008  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+PKG_NAME   = urlgrabber
+VER        = 3.1.0
+
+THISAPP    = $(PKG_NAME)-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+
+TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+install: $(TARGET)
+
+download : $(objects)
+
+$(objects) :
+       @$(LOAD)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET):
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+
+ifeq "$(STAGE)" "$(SNAME)"
+       cd $(DIR_APP) && python setup.py install
+endif
+
+ifeq "$(STAGE)" "installer"
+       cd $(DIR_APP) && python setup.py install --prefix=$(INSTALLER_DIR)/usr
+endif
+
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 45e753fff2e081bcb93c48aabb2fbae3283c35a4..1e29327682bd0ce231c0aea4ff6eac00beb28a21 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -190,7 +190,9 @@ ipfire_build() {
        ipfire_make openssl
        ipfire_make perl                        ### We are building the modules here.
        ipfire_make python
-       ipfire_make python-modules
+       ipfire_make python-dbus
+       ipfire_make python-urlgrabber
+       ipfire_make python-iconv
        ipfire_make libxml2
        ipfire_make libxslt
        ipfire_make gmp
@@ -447,7 +449,10 @@ installer_build() {
        ipfire_make hal
        ipfire_make hal-info
        ipfire_make python
-       ipfire_make python-modules
+       ipfire_make python-dbus
+       ipfire_make python-parted
+       ipfire_make python-urlgrabber
+       ipfire_make python-iconv
        ipfire_make slang
        ipfire_make newt
        ipfire_make bash