Commit d0764845 authored by Xavier Thompson's avatar Xavier Thompson

Initial build script based on official Debian package

parents
#!/usr/bin/make -f
REPOS = https://lab.nexedi.com/nexedi/cython.git
TAG = cythonplus-0.2
NAME = Xavier Thompson
EMAIL = xavier.thompson@nexedi.com
define SED_CTRL
s/^(Maintainer:).*/\1 $(NAME) <$(EMAIL)>/
/^Uploaders:/d
s,^(Homepage:).*,\1 https://cython.plus/,
s,^(Vcs-Git:).*,\1 $(REPOS),
/^Vcs-Browser:/d
endef
export SED_CTRL NAME EMAIL
DPKG_INFO = /var/lib/dpkg/info
BUILD_ESSENTIAL = $(DPKG_INFO)/build-essential.list
DEVSCRIPTS = $(DPKG_INFO)/devscripts.list
ifeq ($(shell id -u),0)
SUDO =
else
SUDO = sudo
endif
all: cython/debian $(BUILD_ESSENTIAL)
cd cython && \
$(SUDO) apt-get build-dep . && \
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -b
$(DPKG_INFO)/%.list:
$(SUDO) apt-get install $(*F) --no-install-recommends
cython:
git clone -b $(TAG) $(REPOS)
cython/debian: cython $(DEVSCRIPTS)
[ ! -e debian ] || rm -r debian
wget -qO - https://salsa.debian.org/python-team/packages/cython/-/archive/debian/master/cython-debian-master.tar.gz?path=debian | tar -xz --strip-components=1
sed -ri "$$SED_CTRL" debian/control
dch --force-distribution -D nexedi -v `cd $< && git describe |sed s/-/+cp-/`-deb`cat /etc/debian_version` "New Cython+ release: $(TAG)"
mv debian $<
.PHONY: all
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment