1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#!/usr/bin/make -f
# -*- coding: utf-8 -*-
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
include /usr/share/dpkg/buildflags.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk
DEB_MAKE_BUILD_TARGET := emms-print-metadata autoloads
DEB_MAKE_INSTALL_TARGET :=
build/emms::
make -C doc/ all emms.html
# Generate the upstream tarball from upstream Git (adapted from
# http://wiki.debian.org/SandroTosi/Svn_get-orig-source for Git)
PACKAGE := $(shell dpkg-parsechangelog | \
sed -ne 's/^Source: \([a-z.]*\).*/\1/p')
SRC_VERSION := $(shell dpkg-parsechangelog | \
sed -ne 's/^Version: \([^-]\+\)-.*/\1/p')
ifneq (,$(findstring git, $(SRC_VERSION)))
GIT_VERSION := $(shell echo $(SRC_VERSION) | \
sed -ne 's/.*git\([a-z0-9]\+\)/\1/p')
else
GIT_VERSION := $(shell echo $(SRC_VERSION) | \
sed -ne 's/\([0-9]\+:\)\?\([0-9.]\+\)/\2/p')
endif
TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
get-orig-source:
rm -rf get-orig-source ../$(TARBALL)
git clone git://git.sv.gnu.org/emms.git \
get-orig-source/
cd get-orig-source/ && \
git archive --prefix=$(PACKAGE)-$(SRC_VERSION).orig/ \
--format=tar $(GIT_VERSION) `/bin/ls | grep -v master` | \
gzip --no-name --best > ../../$(TARBALL)
rm -rf get-orig-source
@echo "'../$(TARBALL)' created."
.PHONY: get-orig-source
|