Permalink
Browse files

Changed get-orig-source of debian/rules.

  • Loading branch information...
1 parent 47a8910 commit e6cb68edc4c68e581a3eca4c14e93c268b4de5d1 @varialus committed Oct 6, 2012
Showing with 42 additions and 28 deletions.
  1. +2 −2 README
  2. +1 −1 kdragonflybsd-3/debian/changelog
  3. +39 −25 kdragonflybsd-3/debian/rules
View
4 README
@@ -27,8 +27,8 @@ http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-kfreebsd-amd64/curr
In one of two console terminals:
- cd ~/kbsd-build-comparison/freebsd
- - svn checkout svn://svn.debian.org/glibc-bsd
- - cd glibc-bsd/kfreebsd-9/
+ - svn checkout svn://svn.debian.org/glibc-bsd/trunk
+ - cd trunk/kfreebsd-9/
- ./debian/rules
- dpkg-buildpackage
- Install kFreeBSD.
@@ -1,4 +1,4 @@
-dragonflybsd-kernel-3.0 (3.0-1) unstable; urgency=low
+dragonflybsd-kernel-3.0 (3.0.1) unstable; urgency=low
* Initial release.
@@ -10,9 +10,8 @@ export DH_VERBOSE=1
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-full_version := $(shell dpkg-parsechangelog | grep ^Version: | sed -e 's/^.*: //g')
-tar_version := $(shell echo $(full_version) | sed -e 's/-.*//g')
-svn_revision := $(shell echo $(full_version) | sed -e 's/.*~svn\([0-9]*\)-[0-9]*/\1/g')
+full_version := $(shell /usr/bin/dpkg-parsechangelog | grep ^Version: | sed -e 's/^.*: //g')
+tag_version := $(shell echo $(full_version) | sed -e 's/-.*//g')
version := $(shell echo $(full_version) | sed -e 's/[~+-].*//g')
major := $(shell echo $(version) | sed -e 's/\..*//g')
revision := $(shell echo $(full_version) | sed -e 's/^[^+-]*//g')
@@ -30,37 +29,52 @@ else
kbsd_cpu := $(cpu)
endif
-SVN := http://avalon.dragonflybsd.org/packages/x86_64/DragonFly-$(version)
-#SVN := http://avalon.dragonflybsd.org/packages/amd64/
-#SVN := http://avalon.dragonflybsd.org/packages/i386/
-#SVN := http://svn.dragonflybsd.org/base/release/$(version).0
-#SVN := http://svn.dragonflybsd.org/base/releng/$(version)
-#SVN := http://svn.dragonflybsd.org/base/stable/$(major)
-#SVN := http://svn.dragonflybsd.org/base/head
-SOURCE_PACKAGE := $(CURDIR)/debian/kdragonflybsd-source-$(version)
-IMAGE_PACKAGE := $(CURDIR)/debian/kdragonflybsd-image-$(version)-$(abiname)
-HEADERS_PACKAGE := $(CURDIR)/debian/kdragonflybsd-headers-$(version)-$(abiname)
-SRC_TAR := kdragonflybsd-source-$(version).tar.xz
-SRC_DIR := kdragonflybsd-source-$(version)
-HEADERS_DIR := kdragonflybsd-headers-$(version)-$(abiname)
-FLAVOR_DIR := flavor-$(version)-$(abiname)
-ORIG_DIR := kdragonflybsd-$(major)-$(tar_version)
-ORIG_TAR := kdragonflybsd-$(major)_$(tar_version).orig.tar.gz
+# Debianized
+SOURCE_PACKAGE := $(CURDIR)/debian/kdragonflybsd-source-$(full_version)
+IMAGE_PACKAGE := $(CURDIR)/debian/kdragonflybsd-image-$(full_version)-$(abiname)
+HEADERS_PACKAGE := $(CURDIR)/debian/kdragonflybsd-headers-$(full_version)-$(abiname)
+
+# Non-Debianized
+SRC_TAR := kdragonflybsd-source-$(full_version).tar.xz
+SRC_DIR := kdragonflybsd-source-$(full_version)
+HEADERS_DIR := kdragonflybsd-headers-$(full_version)-$(abiname)
+FLAVOR_DIR := flavor-$(full_version)-$(abiname)
+ORIG_DIR := kdragonflybsd-$(full_version)
+ORIG_TAR := kdragonflybsd-$(full_version).orig.tar.gz
+
MAKE := make MACHINE_ARCH=$(kdragonflybsd_cpu) CC=gcc-$(gcc_version) WERROR=
PATH := $(CURDIR)/config:/usr/lib/dragonflybsd:$(PATH)
# Disable install of *.ko.symbols files (their presence would trigger an
# "unstripped-binary-or-object" lintian error).
MAKE += -DWITHOUT_KERNEL_SYMBOLS
+# United States, California
+dfly_git := git://avalon.dragonflybsd.org/dragonfly.git
+# (NOTE: slow)
+# dfly_git := git://crater.dragonflybsd.org/dragonfly.git
+# United States, Maryland
+# dfly_git := git://batman.acm.jhu.edu/dragonfly.git
+# Europe, Estonia
+# dfly_git := git://anoncvs.estpak.ee/dragonfly.git
+# Europe, France
+# dfly_git := git://island.quantumachine.net/dragonfly.git
+# Europe, Norway
+# dfly_git := git://koan.bondconsult.net/dragonfly.git
+
get-orig-source:
rm -rf $(ORIG_DIR)
- for i in sys usr.sbin/config ; do \
- svn export $(SVN)/$$i $(ORIG_DIR)/$$i ; \
- done
- cd $(ORIG_DIR) && $(CURDIR)/debian/prune.sh
- tar --numeric-owner --owner 0 --group 0 -czf ../$(ORIG_TAR) $(ORIG_DIR)
- rm -rf $(ORIG_DIR)
+ mkdir $(ORIG_DIR)
+ cd $(ORIG_DIR)
+ git init
+ git remote add dragonfly $(dfly_git)
+ git config core.sparsecheckout true
+ echo sys >> .git/info/sparse-checkout
+ git checkout $(version)
+ git pull $(dfly_git)
+ git archive $(version) | gzip > $(CURDIR)/$(ORIG_TAR)
+ $(CURDIR)/debian/prune.sh
+ chown 0:0 $(CURDIR)/$(ORIG_TAR)
control: clean
for arch in `ls $(CURDIR)/debian/arch/` ; do \

0 comments on commit e6cb68e

Please sign in to comment.