15
15
| grep ^Version | cut -d" " -f2 | cut -d"-" -f1 )
16
16
SOURCE_DIR=nouveau-kernel-source-$(CURVER)
17
17
TARBALL=nouveau-kernel-source_$(CURVER).orig.tar.gz
18
USEFUL_FILES = git-revision \
22
linux-core/ati_pcigart.c \
24
linux-core/Makefile.kernel \
27
shared-core/nouveau* \
29
19
CURRENT_SNAPSHOT_FILE = $(DEBIAN_DIR)/snapshot-hash
30
20
CURRENT_SNAPSHOT_SHA = $(shell cat $(CURRENT_SNAPSHOT_FILE))
22
# Because cloning a full kernel tree is no fun at all, you can pass
23
# GIT_OPTIONS to debian/rules get-orig-source.
24
# Passing --reference=/path/to/local/kernel/repository will cut down on
25
# bandwidth considerably!
27
# We need to fetch from Linus' kernel tree in order to pick up the tags
28
# needed for "git annotate" to work correctly. This gives us a nice
29
# drm module version number, and makes upstream love us more.
33
git clone git://anongit.freedesktop.org/git/mesa/drm $(SOURCE_DIR)
34
cd $(SOURCE_DIR) && git checkout $(CURRENT_SNAPSHOT_SHA)
36
$(SOURCE_DIR)/git-revision : $(SOURCE_DIR)
37
cd $(SOURCE_DIR) && git describe --abbrev=17 > git-revision
39
$(TARBALL): $(SOURCE_DIR)/git-revision
40
tar czvf $(TARBALL) $(addprefix $(SOURCE_DIR)/,$(USEFUL_FILES))
31
git clone git://anongit.freedesktop.org/git/nouveau/linux-2.6 $(SOURCE_DIR).temp $(GIT_OPTIONS)
32
cat $(DEBIAN_DIR)/linus-git-config-fragment >> \
33
$(SOURCE_DIR).temp/.git/config \
34
&& cd $(SOURCE_DIR).temp \
36
cd $(SOURCE_DIR).temp && git checkout $(CURRENT_SNAPSHOT_SHA)
37
cd $(SOURCE_DIR).temp && git checkout origin/master-compat -- nouveau
39
cd $(SOURCE_DIR).temp && git describe --abbrev=17 > ../$(SOURCE_DIR)/annotated_version
40
mkdir $(SOURCE_DIR)/drivers
41
mv $(SOURCE_DIR).temp/drivers/gpu $(SOURCE_DIR)/drivers
42
mkdir $(SOURCE_DIR)/include
43
mv $(SOURCE_DIR).temp/include/drm $(SOURCE_DIR)/include
44
mv $(SOURCE_DIR).temp/COPYING $(SOURCE_DIR)
45
mv $(SOURCE_DIR).temp/CREDITS $(SOURCE_DIR)
46
mv $(SOURCE_DIR).temp/MAINTAINERS $(SOURCE_DIR)
47
mv $(SOURCE_DIR).temp/README $(SOURCE_DIR)
48
mv $(SOURCE_DIR).temp/nouveau $(SOURCE_DIR)
50
$(TARBALL): $(SOURCE_DIR)
51
tar czvf $(TARBALL) $(SOURCE_DIR)
42
53
get-orig-source: $(TARBALL)
54
rm -rf $(SOURCE_DIR) $(SOURCE_DIR).temp
45
get-new-snapshot: CURVER=0.0.11+git$(shell date +%Y%m%d)
56
get-new-snapshot: CURVER=0.0.14+git$(shell date +%Y%m%d)
46
57
get-new-snapshot: CURRENT_SNAPSHOT_SHA=HEAD
47
58
get-new-snapshot: $(TARBALL)
59
cd $(SOURCE_DIR).temp && \
49
60
git log --pretty=format:%H HEAD~.. > $(CURRENT_SNAPSHOT_FILE)
61
rm -rf $(SOURCE_DIR) $(SOURCE_DIR).temp
52
63
.PHONY: get-orig-source get-new-snapshot