summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-06-30 18:42:45 +0000
committerIgor Pashev <pashev.igor@gmail.com>2012-06-30 18:42:45 +0000
commit7ae814234f3261177ec8207532dd62367593179d (patch)
tree13842659f0cb7e9ca9779c5e88a5c31d9d3398f0
parent3c8092a49235ae57bbab6c068fa84bd3305f4365 (diff)
downloadillumos-packaging-7ae814234f3261177ec8207532dd62367593179d.tar.gz
Prove of concept: build UTS from source
-rw-r--r--uts/debian/control16
-rwxr-xr-xuts/debian/rules70
-rw-r--r--uts/debian/unix-libc-dev.install1
3 files changed, 55 insertions, 32 deletions
diff --git a/uts/debian/control b/uts/debian/control
index e9e3453..e2bf90a 100644
--- a/uts/debian/control
+++ b/uts/debian/control
@@ -1,10 +1,10 @@
Source: uts
Section: kernel
-Priority: important
+Priority: optional
Maintainer: Igor Pashev <pashev.igor@gmail.com>
Build-Depends:
- debhelper ( >= 8 ),
-Standards-Version: 3.9.2
+ debhelper ( >= 8 ), illumos-source, patch, quilt, sunmake, libc-dev-bin, ksh93
+Standards-Version: 3.9.3
Homepage: http://illumos.org/
@@ -13,8 +13,16 @@ Architecture: illumos-amd64
Section: devel
Priority: optional
Replaces: libc1-dev
+Depends: ${misc:Depends}
Description: Unix support headers for userspace development
- This package provides userspaces headers from the Unix kernel. These
+ This package provides userspace headers from the Unix kernel. These
headers are used by the installed headers for libc and other system
libraries.
+Package: unix-kstat-dev
+Architecture: any
+Section: devel
+Priority: optional
+Depends: ${misc:Depends}
+Description: unix kernel kstat development files
+ This package includes headers and manpages for kernel statistics driver
diff --git a/uts/debian/rules b/uts/debian/rules
index cc18f2a..92265a5 100755
--- a/uts/debian/rules
+++ b/uts/debian/rules
@@ -1,33 +1,49 @@
#!/usr/bin/make -f
+illtar = /usr/src/illumos-gate/illumos-gate.tar.xz
-%:
- dh $@
+DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-override_dh_auto_configure:
-override_dh_auto_build:
-override_dh_auto_test:
-override_dh_auto_install:
- ln -sf ../../root_i386 debian/tmp
-override_dh_auto_clean:
-override_dh_installmodules:
+CODEMGR_WS = $(CURDIR)/illumos-gate
+
+
+unpack: unpack-stamp
+unpack-stamp: $(illtar)
+ dh_testdir
+ tar xf $(illtar) \
+ --exclude=usr/src/cmd \
+ --exclude=usr/src/lib \
+ --exclude=usr/src/head
+ touch $@
+
+illumos-gate/illumos.sh: unpack-stamp
+ cd illumos-gate && \
+ sed -r '/export\s+CODEMGR_WS=/ s,CODEMGR_WS=.*,CODEMGR_WS="$(CODEMGR_WS)",' \
+ usr/src/tools/env/illumos.sh > illumos.sh
-override_dh_install:
+patch: unpack
+ dh_testdir
+ [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a
+
+unpatch:
+ dh_testdir
+ [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a
+
+build build-arch build-indep: build-stamp
+build-stamp: patch illumos-gate/illumos.sh
+ cd illumos-gate && \
+ ksh93 usr/src/tools/scripts/bldenv.sh -d illumos.sh -c "cd usr/src/uts && /usr/bin/sunmake install_h"
+ touch $@
+
+install: install-stamp
+install-stamp: build-stamp
+ dh_testdir
dh_install
- cd debian/unix-libc-dev && \
- patch -p1 < ../patches/u_int_types.patch && \
- patch -p1 < ../patches/asm-linkage.patch
-
-
- # Check whether headers are consistent (no dangling "include"s):
- # Don't bailout: some headers require C headers:
- cd debian/unix-libc-dev/usr/include && \
- for h in */*.h; do \
- cpp -M $$h -nostdinc -I . \
- -D_CHAR_IS_SIGNED \
- -D_BIT_FIELDS_LTOH \
- -D__XOPEN_OR_POSIX \
- -D_XPG4_2 \
- >/dev/null || true; \
- done
-
+ touch $@
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ dh_clean
+ rm -rf illumos-gate
+ rm -f *-stamp
diff --git a/uts/debian/unix-libc-dev.install b/uts/debian/unix-libc-dev.install
index b16ed63..083392a 100644
--- a/uts/debian/unix-libc-dev.install
+++ b/uts/debian/unix-libc-dev.install
@@ -51,7 +51,6 @@ usr/include/netinet/tcp.h
usr/include/netinet/tcpip.h
usr/include/netinet/udp_var.h
usr/include/netinet/udp.h
-usr/include/netinet/vrrp.h
usr/include/sys/aio_req.h
usr/include/sys/aio.h
usr/include/sys/aiocb.h