63 lines
1.7 KiB
Makefile
63 lines
1.7 KiB
Makefile
.PHONY: control
|
|
|
|
# debian files were taking from upstream:
|
|
# git clone https://github.com/coredns/debian.git
|
|
|
|
# TARBALL=~/tmp/flutter-3.7.0-1.5.pre.tgz
|
|
VERSION=1.10.1
|
|
MINOR=7da2ceda
|
|
BASENAME=coredns
|
|
|
|
help:
|
|
@echo
|
|
@echo "make all # to attempt to download, extract and build the .deb package using dpkg"
|
|
@echo
|
|
|
|
all: download clean extract DEBIAN build
|
|
|
|
# uses 'ar' to make a .deb file
|
|
raw: download clean extract DEBIAN tar-ar
|
|
|
|
clean:
|
|
rm -rf ../files
|
|
rm -f ../*.deb
|
|
rm -f ../*.tar.xz data.tar.xz
|
|
rm -rf DEBIAN
|
|
|
|
download:
|
|
@echo
|
|
@echo CHECK FOR NEW VERSION via 'git tags'
|
|
@echo
|
|
|
|
extract:
|
|
cp -a files ../
|
|
mkdir -p ../files/usr/bin
|
|
mkdir -p ../files/usr/share/man/man1/ ../files/usr/share/man/man5/ ../files/usr/share/man/man7/
|
|
cp ~/go/src/github.com/coredns/coredns/coredns ../files/usr/bin
|
|
cp ~/go/src/github.com/coredns/coredns/man/*.1 ../files/usr/share/man/man1/
|
|
cp ~/go/src/github.com/coredns/coredns/man/*.5 ../files/usr/share/man/man5/
|
|
cp ~/go/src/github.com/coredns/coredns/man/*.7 ../files/usr/share/man/man7/
|
|
|
|
# makes the DEBIAN/ directory
|
|
DEBIAN:
|
|
mkdir -p DEBIAN
|
|
make md5sum
|
|
make control
|
|
cp postinst DEBIAN
|
|
|
|
control:
|
|
mkdir -p DEBIAN
|
|
cp control DEBIAN/
|
|
echo Version: ${VERSION}.${MINOR} >>DEBIAN/control
|
|
echo Build-Date: `stat -c %z ~/go/src/github.com/coredns/coredns/coredns` >>DEBIAN/control
|
|
echo Source-Date: `cd ~/go/src/github.com/coredns/coredns/ && git log -1 --format=%cd` >>DEBIAN/control
|
|
|
|
md5sum:
|
|
cd ../files/ && find -type f -exec md5sum '{}' \; |sort -k2 >../md5sums
|
|
mv ../md5sums DEBIAN/
|
|
|
|
build:
|
|
mv DEBIAN ../files/
|
|
cd .. && dpkg-deb --build files ${BASENAME}_${VERSION}.${MINOR}_amd64.deb
|
|
cd .. && dpkg-deb --info ${BASENAME}_${VERSION}.${MINOR}_amd64.deb
|