summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorDavid Nusinow <[email protected]>2006-09-24 21:11:46 +0000
committerDavid Nusinow <[email protected]>2006-09-24 21:11:46 +0000
commiteadb76b3f8e0e9b82da762bd29e53895bf9e6351 (patch)
treeb9f68fc763f9ea055287c366e61de84191b200ce /debian/rules
parentb3f7313ae4f4cd418522595e90e7d06ef6992f0a (diff)
Bump to latest mesa in Debian
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules39
1 files changed, 24 insertions, 15 deletions
diff --git a/debian/rules b/debian/rules
index 6365329261a..97beb4f9f9d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,7 @@
#!/usr/bin/make -f
export DH_OPTIONS
+export DEB_HOST_ARCH
CFLAGS = -Wall -g
@@ -18,19 +19,19 @@ DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
STAMPDIR := debian/stamp
select_target_any = $(shell dh_listpackages -s | grep -v '^$$' | while read p ; do cut -d ' ' -f 1,3 debian/libdir.map | grep -w $$p ; done | grep -v _ | cut -d ' ' -f 1 | sort -u | grep ^$(1)- | cut -d - -f 2-)
-select_target_arch = $(filter $(foreach t,$(BUILD_$(1)_TARGETS_any),$(t)_%), $(patsubst configs/%, %, $(wildcard configs/*_$(DEB_HOST_ARCH))))
+select_target_arch = $(filter $(shell dh_listpackages -s | grep -v '^$$' | while read p ; do cut -d ' ' -f 1,3 debian/libdir.map | grep -w $$p ; done | grep _ | cut -d ' ' -f 1 | sort -u | grep ^$(1)- | cut -d - -f 2-), $(patsubst configs/%, %, $(wildcard configs/*_$(DEB_HOST_ARCH))))
select_target = $(sort $(BUILD_$(1)_TARGETS_any) $(BUILD_$(1)_TARGETS_arch))
BUILD_GL_TARGETS_any := $(call select_target_any,gl)
-BUILD_GL_TARGETS_arch := $(call select_target_arch,GL)
+BUILD_GL_TARGETS_arch := $(call select_target_arch,gl)
BUILD_GL_TARGETS := $(call select_target,GL)
BUILD_GLU_TARGETS_any := $(call select_target_any,glu)
-#BUILD_GLU_TARGETS_arch := $(call select_target_arch,GLU)
+#BUILD_GLU_TARGETS_arch := $(call select_target_arch,glu)
BUILD_GLU_TARGETS := $(call select_target,GLU)
BUILD_GLW_TARGETS_any := $(call select_target_any,glw)
-#BUILD_GLW_TARGETS_arch := $(call select_target_arch,GLW)
+#BUILD_GLW_TARGETS_arch := $(call select_target_arch,glw)
BUILD_GLW_TARGETS := $(call select_target,GLW)
BUILD_TARGETS := \
@@ -42,8 +43,6 @@ ifneq ($(strip $(shell grep-dctrl -n -s Package -PX libgl1-mesa-directfb debian/
DFB_MODULE_DIR := $(shell pkg-config --variable=moduledir directfb-internal)
endif
-DRI_MODULE_DIR := /usr/lib/dri
-
build: $(STAMPDIR)/build
$(STAMPDIR)/build: $(BUILD_TARGETS)
dh_testdir
@@ -54,6 +53,9 @@ $(STAMPDIR)/build: $(BUILD_TARGETS)
# 2: target (debian, debian-i386, ...)
# 3: subdir to build (mesa, glw, glu/sgi)
+driver_map = $(word $(2),$(shell grep '^$(1) ' debian/drivers.map))
+libdir_map = $(word $(2),$(shell grep '^$(1) ' debian/libdir.map))
+
define build_target_actions
dh_testdir
chmod +x debian/shadowtree
@@ -64,7 +66,7 @@ define build_target_actions
mkdir -p build/$(1)-$(2)/lib/ ; \
ln -sf ../../gl-$(2)/lib/libGL.so build/$(1)-$(2)/lib/ ; \
fi
- make -C build/$(1)-$(2)/src SRC_DIRS=$(3)
+ make -C build/$(1)-$(2)/src SRC_DIRS=$(3) DEBIAN_DRIVERS_DIR=$(if $(call driver_map,$(1)-$(2),1),/$(call driver_map,$(1)-$(2),3))
if test $(1) != gl ; then \
rm build/$(1)-$(2)/lib/libGL.so ; \
fi
@@ -94,7 +96,6 @@ define install_target_lib_actions
dh_install -p$(4) build/$(1)/lib/lib*.a $(2)
endef
-libdir_map = $(word $(2),$(shell grep '^$(1) ' debian/libdir.map))
install_target_libs = $(call install_target_lib_actions,$(1),$(call libdir_map,$(1),2),$(call libdir_map,$(1),3),$(call libdir_map,$(1),4))
# Parameters:
@@ -108,7 +109,6 @@ define install_target_driver_actions
dh_install -p$(4) build/$(1)/$(2) $(3)
endef
-driver_map = $(word $(2),$(shell grep '^$(1) ' debian/drivers.map))
install_target_drivers = $(if $(call driver_map,$(1),1),$(call install_target_driver_actions,$(1),$(call driver_map,$(1),2),$(call driver_map,$(1),3),$(call driver_map,$(1),4)))
# Parameters:
@@ -144,14 +144,14 @@ clean:
dh_testroot
$(RM) -rf debian/stamp
$(RM) -rf build
- dh_clean
+ dh_clean debian/mesa-swx11-source.install
install: build install-all
@echo Target $@.
@echo Target $@: done.
binary-indep: DH_OPTIONS := -i
-binary-indep: build
+binary-indep: debian/mesa-swx11-source.install build
@echo Target $@
dh_testdir
dh_testroot
@@ -186,7 +186,6 @@ binary-arch: build install
dh_compress -s
dh_fixperms -s
# dh_makeshlibs -s -Nlibglu1-mesa -Nmesag3
- dh_makeshlibs -plibgl1-mesa-swx11-dbg -V 'libgl1-mesa-swx11 | libgl1'
ifneq ($(strip $(shell dh_listpackages -s | grep -w libgl1-mesa-glide3)),)
dh_makeshlibs -plibgl1-mesa-glide3 -V 'libgl1-mesa-glide3'
endif
@@ -197,7 +196,7 @@ ifneq ($(strip $(shell dh_listpackages -s | grep -w libosmesa6)),)
dh_makeshlibs -plibosmesa6
endif
ifneq ($(strip $(shell dh_listpackages -s | grep -w libgl1-mesa-swx11)),)
- dh_makeshlibs -plibgl1-mesa-swx11 -V 'libgl1-mesa-swx11 | libgl1'
+ dh_makeshlibs -plibgl1-mesa-swx11
endif
ifneq ($(strip $(shell dh_listpackages -s | grep -w libgl1-mesa-glx)),)
dh_makeshlibs -plibgl1-mesa-glx -V 'libgl1-mesa-glx | libgl1'
@@ -208,7 +207,7 @@ endif
# Make sure nothing has been left behind.
find debian -mindepth 2 -name shlibs | cut -d / -f 2 | sort -u > \
debian/shlibs.actual
- find debian -mindepth 2 -name lib\*.so.\* | cut -d / -f 2 | sort -u > \
+ find debian -mindepth 2 -name lib\*.so.\* | grep -v dbg | cut -d / -f 2 | sort -u > \
debian/shlibs.should
cmp debian/shlibs.actual debian/shlibs.should
rm debian/shlibs.actual debian/shlibs.should
@@ -219,5 +218,15 @@ endif
dh_builddeb -s
@echo Target $@: done.
+list-targets:
+ @for t in $(BUILD_GL_TARGETS_arch) ; do echo $$t ; done
+
+debian/mesa-swx11-source.install:
+ ( find src/mesa src/glx/x11 include/GL/internal -name '*.[ch]' ; \
+ find include/GL -name 'xmesa*' ) | \
+ egrep -v 'drivers/(dri/(fb|ffb|gamma|i[a-z0-9]+|mach64|mga|r[0-9]+|radeon|s3v|savage|sis|tdfx|trident|unichrome)|directfb|dos|fbdev|ggi|glide|osmesa|svga|windows)/' | \
+ while read x; do echo $$x usr/share/mesa-source/`dirname $$x`; done \
+ > $@
+
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install configure debian/mesa-swx11-source.install