Skip to content

Commit

Permalink
Drop package from release build, add .sha256
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Mar 19, 2022
1 parent f3ed3df commit fcafae8
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,11 @@ dist_man1_MANS = mcjoin.1
doc_DATA = README.md LICENSE doc/mcjoin-send.jpg doc/mcjoin-recv.jpg
EXTRA_DIST = README.md LICENSE ChangeLog.md doc/mcjoin-send.jpg doc/mcjoin-recv.jpg

package:
@debuild -uc -us -B --lintian-opts --profile debian -i -I

## Generate MD5 checksum file
MD5 = md5sum
md5-dist:
@for file in $(DIST_ARCHIVES); do \
$(MD5) $$file > ../$$file.md5; \
done

## Check if tagged in git
#
# Check if tagged in git
#
release-hook:
@if [ ! `git tag | grep $(PACKAGE_VERSION)` ]; then \
@if [ ! `git tag -l v$(PACKAGE_VERSION) | grep $(PACKAGE_VERSION)` ]; then \
echo; \
printf "\e[1m\e[41mCannot find release tag $(PACKAGE_VERSION)\e[0m\n"; \
printf "\e[1m\e[5mDo release anyway?\e[0m "; read yorn; \
Expand All @@ -31,16 +23,25 @@ release-hook:
echo; \
fi

## Target to run when building a release
release: release-hook distcheck package md5-dist
#
# Generate .deb package(s)
#
package:
@debuild -uc -us -B --lintian-opts --profile debian -i -I --show-overrides

#
# Target to run when building a release
#
release: release-hook distcheck
@for file in $(DIST_ARCHIVES); do \
md5sum $$file > ../$$file.md5; \
sha256sum $$file > ../$$file.sha256; \
done
@mv $(DIST_ARCHIVES) ../
@echo
@echo "Resulting release files:"
@echo "================================================================="
@for file in $(DIST_ARCHIVES); do \
printf "%-32s Distribution tarball\n" $$file; \
printf "%-32s " $$file.md5; cat ../$$file.md5 | cut -f1 -d' '; \
done
@for file in `cd ..; ls $(PACKAGE)_$(VERSION)*`; do \
printf "%-32s Debian/Ubuntu package\n" $$file; \
@echo "Resulting release files ======================================================================="
@for file in $(DIST_ARCHIVES); do \
printf "%-30s Distribution tarball\n" $$file; \
printf "%-30s " $$file.md5; cat ../$$file.md5 | cut -f1 -d' '; \
printf "%-30s " $$file.sha256; cat ../$$file.sha256 | cut -f1 -d' '; \
done

0 comments on commit fcafae8

Please sign in to comment.