~udienz/blankon/chromium-codecs-ffmpeg.head

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Fabien Tassin
  • Date: 2010-06-08 12:59:37 UTC
  • Revision ID: fta@ubuntu.com-20100608125937-v610fkmn3zswvu6r
* Re-do the get-orig-source rule with 2 repos instead of 3 following
  the upstream reorganization
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
debian/stamp-configure-ffmpeg-%: GYP_DEFINES += $(FFMPEG_MT_$(subst std,STD,$(subst extra,EXTRA,$*))_FLAGS)
75
75
debian/stamp-configure-ffmpeg-%: debian/stamp-unpack
76
76
        rm -rf $(SRC_DIR)/*.mk $(SRC_DIR)/src/out
77
 
        cd $(SRC_DIR)/src && GYP_DEFINES="$(GYP_DEFINES)" GYP_GENERATORS=make build/gyp_chromium --depth=../src ffmpeg.gyp
 
77
        cd $(SRC_DIR)/src && GYP_DEFINES="$(GYP_DEFINES)" GYP_GENERATORS=make build/gyp_chromium --depth=../src source/ffmpeg.gyp
78
78
        touch $@
79
79
 
80
80
debian/stamp-build-ffmpeg-%: debian/stamp-configure-ffmpeg-%
91
91
 
92
92
# Tarball (get-orig-source & get-current-source)
93
93
FFMPEG_URL   := http://src.chromium.org/svn/trunk/deps/third_party/ffmpeg/
94
 
RULES_URL    := http://src.chromium.org/svn/trunk/src/third_party/ffmpeg/
 
94
RULES_URL    := http://src.chromium.org/svn/trunk/deps/third_party/ffmpeg/
95
95
BUILD_URL    := http://src.chromium.org/svn/trunk/src/build/
96
96
 
97
97
SRC_FILES    := \
107
107
        ffmpeg/ffmpeg-mt.tar.gz \
108
108
        ffmpeg/patches \
109
109
        ffmpeg/README.chromium \
110
 
        gyp/ffmpeg.gyp \
111
 
        gyp/source \
 
110
        ffmpeg/source \
112
111
        $(NULL)
113
112
 
114
113
TMP_DDIR     := $(DEBIAN_NAME)-$(shell echo $$$$)
125
124
ifneq (,$(DEBIAN_TAG))
126
125
get-orig-source: TAG1  = $(NULL)
127
126
get-orig-source: TAG2  = $(NULL)
128
 
get-orig-source: TAG3  = $(NULL)
129
127
else
130
128
get-orig-source: TAG1  = -r $(shell svn log --limit 1 $(FFMPEG_URL) | grep ^r | head -1 | sed -e 's/^r\([^ ]*\).*/\1/')
131
 
get-orig-source: TAG2  = -r $(shell svn log --limit 1 $(RULES_URL)  | grep ^r | head -1 | sed -e 's/^r\([^ ]*\).*/\1/')
132
 
get-orig-source: TAG3  = -r $(shell svn log --limit 1 $(BUILD_URL)  | grep ^r | head -1 | sed -e 's/^r\([^ ]*\).*/\1/')
 
129
get-orig-source: TAG2  = -r $(shell svn log --limit 1 $(BUILD_URL)  | grep ^r | head -1 | sed -e 's/^r\([^ ]*\).*/\1/')
133
130
endif
134
131
get-orig-source: gos-all
135
132
 
136
133
get-current-source: TAG1 = -r $(shell echo $(DEBIAN_REVISION) | cut -d+ -f1)
137
134
get-current-source: TAG2 = -r $(shell echo $(DEBIAN_REVISION) | cut -d+ -f2)
138
 
get-current-source: TAG3 = -r $(shell echo $(DEBIAN_REVISION) | cut -d+ -f3)
139
135
get-current-source: gos-all
140
136
 
141
137
gos-all: gos-co gos-pack
148
144
endif
149
145
        @$(call CO,$(TAG1) -N,$(FFMPEG_URL),$(TMP_DIR)/ffmpeg)
150
146
        @$(call CO,$(TAG1),$(FFMPEG_URL)/patches,$(TMP_DIR)/ffmpeg/patches)
151
 
 
152
 
        @$(call CO,$(TAG2) -N,$(RULES_URL),$(TMP_DIR)/gyp)
153
 
        @$(call CO,$(TAG2),$(RULES_URL)/source/config/Chromium/linux,$(TMP_DIR)/gyp/source/config/Chromium/linux)
154
 
        @$(call CO,$(TAG2),$(RULES_URL)/source/config/Chrome/linux,$(TMP_DIR)/gyp/source/config/Chrome/linux)
155
 
        @$(call CO,$(TAG2),$(RULES_URL)/source/config/libavutil,$(TMP_DIR)/gyp/source/config/libavutil)
156
 
 
157
 
        @$(call CO,$(TAG3),$(BUILD_URL),$(TMP_DIR)/src/build)
 
147
        @$(call CO,$(TAG1) -N,$(FFMPEG_URL)/source,$(TMP_DIR)/ffmpeg/source)
 
148
        @$(call CO,$(TAG1),$(RULES_URL)/source/config/Chromium/linux,$(TMP_DIR)/ffmpeg/source/config/Chromium/linux)
 
149
        @$(call CO,$(TAG1),$(RULES_URL)/source/config/Chrome/linux,$(TMP_DIR)/ffmpeg/source/config/Chrome/linux)
 
150
        @$(call CO,$(TAG1),$(RULES_URL)/source/config/libavutil,$(TMP_DIR)/ffmpeg/source/config/libavutil)
 
151
 
 
152
        @$(call CO,$(TAG2),$(BUILD_URL),$(TMP_DIR)/src/build)
158
153
ifneq (,$(LOCAL_BRANCH))
159
154
        rm -rf $(TMP_DDIR)
160
155
        cp -la $(TMP_DIR) $(TMP_DDIR)
166
161
gos-pack: VERSION  = $(shell echo $(DEBIAN_TAG) | cut -d= -f2)
167
162
else
168
163
gos-pack: REVISION = $(shell cd $(TMP_DIR)/ffmpeg && svn log --xml --limit 1 | grep -E '^( *revision=|<date>)' | tr -d '\n' | \
169
 
                     sed -e 's/.*"\([0-9]*\)".*>\(....\)-\(..\)-\(..\)T.*/\2\3\4r\1/')+$(shell cd $(TMP_DIR)/gyp && \
170
 
                     svn log --limit 1 | grep ^r | head -1 | sed -e 's/^r\([^ ]*\).*/\1/')+$(shell cd $(TMP_DIR)/src/build && \
 
164
                     sed -e 's/.*"\([0-9]*\)".*>\(....\)-\(..\)-\(..\)T.*/\2\3\4r\1/')+$(shell cd $(TMP_DIR)/src/build && \
171
165
                     svn log --limit 1 | grep ^r | head -1 | sed -e 's/^r\([^ ]*\).*/\1/')
172
166
gos-pack: VERSION  = $(shell grep -E '^version [0-9][^:]*:.*' $(TMP_DIR)/ffmpeg/ffmpeg-mt/Changelog | head -1 | sed -e 's/.* \(.*\):/\1/')+svn$(REVISION)
173
167
endif
176
170
        rm -rf  $(TMP_DIR)/ffmpeg-mt
177
171
        mkdir $(TMP_DIR)/$(DEBIAN_NAME)-$(VERSION)
178
172
        tar -cf - -C $(TMP_DIR) $(SRC_FILES) --exclude .svn | tar -xf - -C $(TMP_DIR)/$(DEBIAN_NAME)-$(VERSION)
179
 
        @$(foreach dir,ffmpeg gyp,$(call DO,mv $(TMP_DIR)/$(DEBIAN_NAME)-$(VERSION)/$(dir)/* $(TMP_DIR)/$(DEBIAN_NAME)-$(VERSION)/src); rmdir $(TMP_DIR)/$(DEBIAN_NAME)-$(VERSION)/$(dir);)
 
173
        @$(call DO,mv $(TMP_DIR)/$(DEBIAN_NAME)-$(VERSION)/ffmpeg/* $(TMP_DIR)/$(DEBIAN_NAME)-$(VERSION)/src); rmdir $(TMP_DIR)/$(DEBIAN_NAME)-$(VERSION)/ffmpeg
180
174
        @$(foreach ent,*.tar.gz patches,$(call DO,mv $(TMP_DIR)/$(DEBIAN_NAME)-$(VERSION)/src/$(ent) $(TMP_DIR)/$(DEBIAN_NAME)-$(VERSION));)
181
175
        cd $(TMP_DIR) && tar zcf ../$(DEBIAN_NAME)_$(VERSION).orig.tar.gz --exclude=.svn $(DEBIAN_NAME)-$(VERSION)
182
176
        rm -rf $(TMP_DIR)