ipfs.mk 1.69 KB
Newer Older
1 2 3 4 5 6 7 8
# This file contains quick phony targets to build IPFS packages

ARCH ?= amd64
OS ?= linux

IPFS_VERSION=$(shell curl https://dist.ipfs.io/go-ipfs/versions | tail -n 1)
NUMBER_IPFS_VERSION=$(shell echo ${IPFS_VERSION} | sed 's/v//')

9 10 11
EMAIL ?= "hello@siderus.io"
DEBFULLNAME ?= "Siderus OU"

12 13 14 15 16 17 18 19 20 21 22 23 24
download_ipfs:
	mkdir -p build/orig/
	curl -L --output build/orig/ipfs-${IPFS_VERSION}-${ARCH}.tar.gz \
		https://dist.ipfs.io/go-ipfs/${IPFS_VERSION}/go-ipfs_${IPFS_VERSION}_${OS}-${ARCH}.tar.gz
.PHONY: download_ipfs

unpack_ipfs: download_ipfs
	rm -rf build/source/
	mkdir -p build/source/
	tar -xvzf build/orig/ipfs-${IPFS_VERSION}-${ARCH}.tar.gz -C build/source/
.PHONY: unpack_ipfs

prepare_deb_pkg:
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
	mkdir -p build
	cp -aR source/ipfs.deb build/
	echo "Package: ipfs" >> build/ipfs.deb/control
	# echo "Depends: " >> build/ipfs.deb/control
	echo "Version: ${NUMBER_IPFS_VERSION}-siderus" >> build/ipfs.deb/control
	echo "Maintainer: Siderus Team <hello@siderus.io>" >> build/ipfs.deb/control
	echo "Architecture: ${ARCH}" >> build/ipfs.deb/control
	echo "Description: IPFS is a global, versioned, peer-to-peer filesystem." >> build/ipfs.deb/control
	echo "  It combines good ideas from Git, BitTorrent, Kademlia," >> build/ipfs.deb/control
	echo "  SFS, and the Web. It is like a single bittorrent swarm," >> build/ipfs.deb/control
	echo "  exchanging git objects. IPFS provides an interface as" >> build/ipfs.deb/control
	echo "  simple as the HTTP web, but with permanence built in." >> build/ipfs.deb/control
	echo "  You can also mount the world at /ipfs." >> build/ipfs.deb/control
	echo "  This package is maintained and distributed by Siderus." >> build/ipfs.deb/control
	# Creating the debian directory
40
.PHONY: prepare_deb_pkg