Changeset 579


Ignore:
Timestamp:
Dec 24, 2013, 10:08:58 PM (6 years ago)
Author:
amain
Message:

debian/package: convert package to new calling convention - major step in simplyfing and cleaning up package builds.

Location:
trunk/debian
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/debian/buildenv/debian.mk

    r337 r579  
    3939        $(CHROOT_USER) bash -c "cd /usr/src; exec bash"
    4040
    41 #debian/buildenv/create: debian/buildenv/prepare debian/buildenv/qemu-build debian/buildenv/scratchbox-prepare
    4241debian/buildenv/create: debian/buildenv/prepare debian/buildenv/emdebian-prepare debian/buildenv/qemu-build
    4342        touch $@
     
    8584#
    8685# Use emdebian stable/lenny cross compiler. Unstable seems to be broken now for a long time
     86#
     87# Emdebian suggests to use squeeze, even if on wheezey or higher:
     88# Currently, toolchains for Squeeze are preferred. If using Wheezy or unstable, add
     89# a Squeeze source for your own architecture using your normal Debian mirror for
     90# dependencies which are no longer in wheezy or unstable.
     91#
    8792#EMDEBIAN_RELEASE:=$(DEBIAN_BUILD_VERSION)
    88 EMDEBIAN_RELEASE:=stable
     93EMDEBIAN_RELEASE:=squeeze
     94
     95# Automatic installing of build dependencies
     96#
     97# <= Lenny = apt-cross
     98# >  Lenny = xapt
     99#
     100# Squeeze needs some backorts to get xapt working, so from now on
     101# DebWrt will only support wheezy and up.
     102#
     103# Link: https://wiki.debian.org/EmdebianToolchain
    89104
    90105# note: to speed up setting up: do not install devscripts
    91106# note: a mailservers seems to be installed and started: bad - needs removal
     107
    92108debian/buildenv/emdebian-prepare: debian/buildenv/prepare
     109        @echo "I: Adding squeeze source incase Emdebiand squeeze is missing packages in wheezy or higher..."
    93110        sudo bash -c "echo \"deb $(call qstrip,$(CONFIG_EMDEBIAN_BUILDENV_REPOSITORY)) $(EMDEBIAN_RELEASE) main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
     111        sudo bash -c "echo \"deb $(call qstrip,$(CONFIG_DEBIAN_BUILDENV_REPOSITORY)) squeeze main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
     112        sudo bash -c "echo \"deb-src $(call qstrip,$(CONFIG_DEBIAN_BUILDENV_REPOSITORY)) squeeze main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
    94113        # Add lenny repo, just for apt-cross
    95         sudo bash -c "echo \"deb  http://archive.debian.org/debian lenny main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
     114        #sudo bash -c "echo \"deb  http://archive.debian.org/debian lenny main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
    96115        #sudo bash -c "echo -e \"Package: *\nPin: release a=lenny\nPin-Priority: 200\" > $(DEBIAN_BUILD_DIR)/etc/apt/preferences"
    97116        sudo chroot $(DEBIAN_BUILD_DIR) apt-get update
    98         sudo chroot $(DEBIAN_BUILD_DIR) apt-get -y install apt-cross
    99         sudo chroot $(DEBIAN_BUILD_DIR) apt-get -y install libmpfr1ldbl
    100         sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install build-essential debootstrap fakeroot zlib1g-dev dh-make openssh-client dpkg-cross vim pkg-config dpatch libncurses5-dev devscripts subversion automake gcc-multilib g++-multilib quilt"
     117        #sudo chroot $(DEBIAN_BUILD_DIR) apt-get -y install apt-cross
     118        #sudo chroot $(DEBIAN_BUILD_DIR) apt-get -y install libmpfr1ldbl
     119        sudo chroot $(DEBIAN_BUILD_DIR) apt-get -y install emdebian-archive-keyring xapt dpkg-cross
     120        sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install build-essential dh-make debootstrap fakeroot zlib1g-dev openssh-client vim pkg-config dpatch libncurses5-dev devscripts subversion automake gcc-multilib g++-multilib quilt"
    101121ifeq ($(TARGET_ARCH),arm)
    102122        sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi gcc-4.3-arm-linux-gnu g++-4.4-arm-linux-gnueabi linux-kernel-headers-armel-cross"
     
    142162        rm -f debian/buildenv/qemu-build
    143163
    144 .PHONY: debian/buildenv/clean
     164.PHONY: debian/buildenv/clean debian/buildenv
    145165
  • trunk/debian/package/broadcom-wl/build.mk

    r276 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/broadcom-wl
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/broadcom-wl: debian/package/broadcom-wl/deliver
     20debian/package/broadcom-wl/all: debian/package/broadcom-wl/deliver
    2121        touch $@
    2222
     
    4646
    4747debian/package/broadcom-wl/clean:
     48        rm -f debian/package/broadcom-wl/all
    4849        rm -f debian/package/broadcom-wl/build
    4950        rm -f debian/package/broadcom-wl/prepare
  • trunk/debian/package/debian.mk

    r563 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 # Start with an empty package list
    19 DEBWRT_PKGLST:=
    20 # that list can be extended in the next include statements
     18run_in_chroot  = $(CHROOT_USER) bash -c "cd /usr/src/$(PKG_NAME); export ARCH=$(TARGET_ARCH); $(1)"
     19run_in_chrootr = $(CHROOT)      bash -c "cd /usr/src/$(PKG_NAME); export ARCH=$(TARGET_ARCH); $(1)"
    2120
    22 include $(TOPDIR)/debian/package/libnl/build.mk
    23 include $(TOPDIR)/debian/package/iw/build.mk
    24 include $(TOPDIR)/debian/package/debwrt-kernel-headers/build.mk
    25 include $(TOPDIR)/debian/package/robocfg/build.mk
    26 include $(TOPDIR)/debian/package/nvram/build.mk
    27 include $(TOPDIR)/debian/package/debwrt-hostapd/build.mk
    28 include $(TOPDIR)/debian/package/shellinabox/build.mk
    29 # include $(TOPDIR)/debian/package/libpar2/build.mk
    30 # include $(TOPDIR)/debian/package/nzbget/build.mk
    31 include $(TOPDIR)/debian/package/libnl-tiny/build.mk
    32 include $(TOPDIR)/debian/package/swconfig/build.mk
    33 # include $(TOPDIR)/debian/package/led/build.mk
    34 include $(TOPDIR)/debian/package/broadcom-wl/build.mk
    35 include $(TOPDIR)/debian/package/debwrt-net/build.mk
     21DEBWRT_ROOTFS_PKGLST:= libnl iw debwrt-kernel-headers robocfg nvram \
     22                       debwrt-hostapd shellinabox libnl-tiny swconfig \
     23                       broadcom-wl debwrt-net mjpg-streamer
    3624
    37 debian/package/rootfs: $(DEBWRT_PKGLST)
     25debian/package/rootfs: $(DEBWRT_ROOTFS_PKGLST)
    3826        touch $@
    3927
     
    4533        rm -f $(TOPDIR)/debian/package/*/deliver
    4634
     35debian/package/%:
     36        echo make me: $@
     37        $(MAKE) -f debian/package/$(dir $(subst debian/package/,,$@))build.mk $@
     38
  • trunk/debian/package/debwrt-hostapd/build.mk

    r563 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/debwrt-hostapd
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/debwrt-hostapd: debian/package/debwrt-hostapd/deliver
     20debian/package/debwrt-hostapd/all: debian/package/debwrt-hostapd/deliver
    2121        touch $@
    2222
     
    2929        touch $@
    3030
    31 debian/package/debwrt-hostapd/build: debian/package/debwrt-hostapd/prepare debian/package/libnl
     31debian/package/debwrt-hostapd/build: debian/package/debwrt-hostapd/prepare debian/package/libnl/all
    3232        $(CHROOT_USER) bash -c "cd /usr/src/debwrt-hostapd; export ARCH=$(TARGET_ARCH); ./build.sh"
    3333        touch $@
     
    5353
    5454debian/package/debwrt-hostapd/clean:
     55        rm -f debian/package/debwrt-hostapd/all
    5556        rm -f debian/package/debwrt-hostapd/build
    5657        rm -f debian/package/debwrt-hostapd/prepare
  • trunk/debian/package/debwrt-kernel-headers/build.mk

    r563 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 #DEBWRT_KERNEL_HEADERS_VERSION:=2.6.39.2
     18include $(TOPDIR)/Makefile
    1919
    20 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/debwrt-kernel-headers
    21 
    22 debian/package/debwrt-kernel-headers: openwrt/deliver/check debian/package/debwrt-kernel-headers/deliver
     20debian/package/debwrt-kernel-headers/all: openwrt/deliver/check debian/package/debwrt-kernel-headers/deliver
    2321        touch $@
    2422
     
    5149debian/package/debwrt-kernel-headers/clean:
    5250        rm -f debian/package/debwrt-kernel-headers/build
     51        rm -f debian/package/debwrt-kernel-headers/build
    5352        rm -f debian/package/debwrt-kernel-headers/prepare
    5453        rm -f debian/package/debwrt-kernel-headers/deliver
  • trunk/debian/package/debwrt-net/build.mk

    r292 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 PKG_NAME          = debwrt-net
     18include $(TOPDIR)/Makefile
    1919
    20 CH               := "[\(\)]"
    21 PKG_NAME_VERSION  = $(shell head -1 $(DEBIAN_PACKAGES_DIR)/$(PKG_NAME)/debian/changelog | awk '{gsub(/'$(CH)'/,"",$$2); print $$1"-"$$2}')
    22 DEBWRT_PKGLST    := $(DEBWRT_PKGLST) debian/package/$(PKG_NAME)
    23 run_in_chroot     = $(CHROOT_USER) bash -c "cd /usr/src/$(PKG_NAME); export ARCH=$(TARGET_ARCH); $(1)"
     20PKG_NAME      = debwrt-net
    2421
    25 debian/package/$(PKG_NAME): debian/package/$(PKG_NAME)/deliver
     22CH            := "[\(\)]"
     23PKG_VERSION    = $(shell head -1 $(DEBIAN_PACKAGES_DIR)/$(PKG_NAME)/debian/changelog | awk '{gsub(/'$(CH)'/,"",$$2); print $$1"-"$$2}')
     24run_in_chroot  = $(CHROOT_USER) bash -c "cd /usr/src/$(PKG_NAME); export ARCH=$(TARGET_ARCH); $(1)"
     25
     26debian/package/$(PKG_NAME)/all: debian/package/$(PKG_NAME)/deliver
    2627        touch $@
    2728
     
    3536
    3637debian/package/$(PKG_NAME)/build: debian/package/$(PKG_NAME)/prepare
    37         $(call run_in_chroot,cd $(PKG_NAME_VERSION);dpkg-buildpackage -a${ARCH} -rfakeroot)
     38        $(call run_in_chroot,cd $(PKG_NAME);dpkg-buildpackage -a${ARCH} -rfakeroot)
    3839        $(call run_in_chroot,find -maxdepth 1 -name "*.deb" | xargs -r -t -i sudo dpkg-cross -a ${TARGET_ARCH} -i {} || true)
    3940        touch $@
     
    4849
    4950debian/package/$(PKG_NAME)/clean:
     51        rm -f debian/package/$(PKG_NAME)/all
    5052        rm -f debian/package/$(PKG_NAME)/build
    5153        rm -f debian/package/$(PKG_NAME)/prepare
  • trunk/debian/package/iw/build.mk

    r199 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/iw
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/iw: debian/package/iw/deliver
     20debian/package/iw/all: debian/package/iw/deliver
    2121        touch $@
    2222
     
    2929        touch $@
    3030
    31 debian/package/iw/build: debian/package/iw/prepare debian/package/libnl
     31debian/package/iw/build: debian/package/iw/prepare debian/package/libnl/all
    3232        $(CHROOT_USER) bash -c "cd /usr/src/iw; export ARCH=$(TARGET_ARCH); ./iw.sh"
    3333        touch $@
     
    4141
    4242debian/package/iw/clean:
     43        rm -f debian/package/iw/all
    4344        rm -f debian/package/iw/build
    4445        rm -f debian/package/iw/prepare
  • trunk/debian/package/led/build.mk

    r304 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/led
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/led: debian/package/led/deliver
     20debian/package/led/all: debian/package/led/deliver
    2121        touch $@
    2222
     
    4545
    4646debian/package/led/clean:
     47        rm -f debian/package/led/all
    4748        rm -f debian/package/led/build
    4849        rm -f debian/package/led/prepare
  • trunk/debian/package/libnl-tiny/build.mk

    r199 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/libnl-tiny
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/libnl-tiny: debian/package/libnl-tiny/deliver
     20debian/package/libnl-tiny/all: debian/package/libnl-tiny/deliver
    2121        touch $@
    2222
     
    2929        touch $@
    3030
    31 debian/package/libnl-tiny/build: debian/package/libnl-tiny/prepare debian/package/libnl
     31debian/package/libnl-tiny/build: debian/package/libnl-tiny/prepare debian/package/libnl/all
    3232        $(CHROOT_USER) bash -c "cd /usr/src/libnl-tiny; export ARCH=$(TARGET_ARCH); ./build.sh"
    3333        touch $@
     
    4646
    4747debian/package/libnl-tiny/clean:
     48        rm -f debian/package/libnl-tiny/all
    4849        rm -f debian/package/libnl-tiny/build
    4950        rm -f debian/package/libnl-tiny/prepare
  • trunk/debian/package/libnl/build.mk

    r199 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/libnl
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/libnl: debian/package/libnl/deliver
     20debian/package/libnl/all: debian/package/libnl/deliver
    2121        touch $@
    2222
     
    2929        touch $@
    3030
    31 debian/package/libnl/build: debian/package/libnl/prepare debian/package/debwrt-kernel-headers
     31debian/package/libnl/build: debian/package/libnl/prepare debian/package/debwrt-kernel-headers/all
    3232        #exit 1
    3333        $(CHROOT_USER) bash -c "cd /usr/src/libnl; export ARCH=$(TARGET_ARCH); ./libnl.sh"
     
    4242
    4343debian/package/libnl/clean:
     44        rm -f debian/package/libnl/all
    4445        rm -f debian/package/libnl/build
    4546        rm -f debian/package/libnl/prepare
  • trunk/debian/package/libpar2/build.mk

    r199 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/libpar2
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/libpar2: debian/package/libpar2/deliver
     20debian/package/libpar2/all: debian/package/libpar2/deliver
    2121        touch $@
    2222
     
    4646
    4747debian/package/libpar2/clean:
     48        rm -f debian/package/libpar2/all
    4849        rm -f debian/package/libpar2/build
    4950        rm -f debian/package/libpar2/prepare
  • trunk/debian/package/nvram/build.mk

    r199 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/nvram
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/nvram: debian/package/nvram/deliver
     20debian/package/nvram/all: debian/package/nvram/deliver
    2121        touch $@
    2222
     
    4343
    4444debian/package/nvram/clean:
     45        rm -f debian/package/nvram/all
    4546        rm -f debian/package/nvram/build
    4647        rm -f debian/package/nvram/prepare
  • trunk/debian/package/nzbget/build.mk

    r199 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/nzbget
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/nzbget: debian/package/nzbget/deliver
     20debian/package/nzbget/all: debian/package/nzbget/deliver
    2121        touch $@
    2222
     
    4646
    4747debian/package/nzbget/clean:
     48        rm -f debian/package/nzbget/all
    4849        rm -f debian/package/nzbget/build
    4950        rm -f debian/package/nzbget/prepare
  • trunk/debian/package/robocfg/build.mk

    r199 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/robocfg
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/robocfg: debian/package/robocfg/deliver
     20debian/package/robocfg/all: debian/package/robocfg/deliver
    2121        touch $@
    2222
     
    2929        touch $@
    3030
    31 debian/package/robocfg/build: debian/package/robocfg/prepare debian/package/libnl
     31debian/package/robocfg/build: debian/package/robocfg/prepare debian/package/libnl/all
    3232        $(CHROOT_USER) bash -c "cd /usr/src/robocfg; export ARCH=$(TARGET_ARCH); ./build.sh"
    3333        touch $@
     
    4343
    4444debian/package/robocfg/clean:
     45        rm -f debian/package/robocfg/all
    4546        rm -f debian/package/robocfg/build
    4647        rm -f debian/package/robocfg/prepare
  • trunk/debian/package/shellinabox/build.mk

    r199 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/shellinabox
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/shellinabox: debian/package/shellinabox/deliver
     20debian/package/shellinabox/all: debian/package/shellinabox/deliver
    2121        touch $@
    2222
     
    4646
    4747debian/package/shellinabox/clean:
     48        rm -f debian/package/shellinabox/all
    4849        rm -f debian/package/shellinabox/build
    4950        rm -f debian/package/shellinabox/prepare
  • trunk/debian/package/swconfig/build.mk

    r199 r579  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBWRT_PKGLST:=$(DEBWRT_PKGLST) debian/package/swconfig
     18include $(TOPDIR)/Makefile
    1919
    20 debian/package/swconfig: debian/package/swconfig/deliver
     20debian/package/swconfig/all: debian/package/swconfig/deliver
    2121        touch $@
    2222
     
    2929        touch $@
    3030
    31 debian/package/swconfig/build: debian/package/swconfig/prepare debian/package/libnl
     31debian/package/swconfig/build: debian/package/swconfig/prepare debian/package/libnl/all
    3232        $(CHROOT_USER) bash -c "cd /usr/src/swconfig; export ARCH=$(TARGET_ARCH); ./build.sh"
    3333        touch $@
     
    4646
    4747debian/package/swconfig/clean:
     48        rm -f debian/package/swconfig/all
    4849        rm -f debian/package/swconfig/build
    4950        rm -f debian/package/swconfig/prepare
Note: See TracChangeset for help on using the changeset viewer.