~raof/nouveau/xorg-edgers-kernel-source

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Christopher James Halse Rogers
  • Date: 2009-07-15 05:38:41 UTC
  • mfrom: (31.1.17 nouveau-kernel-source)
  • Revision ID: raof@ubuntu.com-20090715053841-b46hnvyo0cwxslub
Merge from xorg-edgers PPA package.
Flatten the changelog to omit PPA releases.
Update snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 \
19
 
        linux-core/drm* \
20
 
        linux-core/nouveau* \
21
 
        linux-core/nv* \
22
 
        linux-core/ati_pcigart.c \
23
 
        linux-core/Makefile \
24
 
        linux-core/Makefile.kernel \
25
 
        shared-core/drm* \
26
 
        shared-core/nv* \
27
 
        shared-core/nouveau* \
28
 
        scripts
 
18
 
29
19
CURRENT_SNAPSHOT_FILE = $(DEBIAN_DIR)/snapshot-hash
30
20
CURRENT_SNAPSHOT_SHA = $(shell cat $(CURRENT_SNAPSHOT_FILE))
31
21
 
 
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!
 
26
 
 
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.
32
30
$(SOURCE_DIR):
33
 
        git clone git://anongit.freedesktop.org/git/mesa/drm $(SOURCE_DIR)
34
 
        cd $(SOURCE_DIR) && git checkout $(CURRENT_SNAPSHOT_SHA)
35
 
 
36
 
$(SOURCE_DIR)/git-revision : $(SOURCE_DIR)
37
 
        cd $(SOURCE_DIR) && git describe --abbrev=17 > git-revision
38
 
 
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 \
 
35
                && git fetch linus
 
36
        cd $(SOURCE_DIR).temp && git checkout $(CURRENT_SNAPSHOT_SHA)
 
37
        cd $(SOURCE_DIR).temp && git checkout origin/master-compat -- nouveau
 
38
        mkdir $(SOURCE_DIR)
 
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)
 
49
 
 
50
$(TARBALL): $(SOURCE_DIR)
 
51
        tar czvf $(TARBALL) $(SOURCE_DIR)
41
52
 
42
53
get-orig-source: $(TARBALL)
43
 
        rm -rf $(SOURCE_DIR)
 
54
        rm -rf $(SOURCE_DIR) $(SOURCE_DIR).temp
44
55
 
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)
48
 
        cd $(SOURCE_DIR) && \
 
59
        cd $(SOURCE_DIR).temp && \
49
60
                git log --pretty=format:%H HEAD~.. > $(CURRENT_SNAPSHOT_FILE)
50
 
        rm -rf $(SOURCE_DIR)
 
61
        rm -rf $(SOURCE_DIR) $(SOURCE_DIR).temp
51
62
 
52
63
.PHONY: get-orig-source get-new-snapshot