diff options
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | guix.scm | 35 |
2 files changed, 41 insertions, 1 deletions
@@ -1,6 +1,11 @@ CC=gcc CFLAGS ?= -Wall -g -I./include +PREFIX=/usr/local +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/share/man + + mcping: mcping.c mctypes.o mcnetwork.o $(CC) $(CFLAGS) $^ -o $@ @@ -17,4 +22,4 @@ clean: rm -f *.o *~ install: mcping - cp $^ $(PREFIX)/bin + install -D -m 0755 -t $(DESTDIR)$(BINDIR) $^ diff --git a/guix.scm b/guix.scm new file mode 100644 index 0000000..65036fb --- /dev/null +++ b/guix.scm @@ -0,0 +1,35 @@ +(use-modules + (guix gexp) + (guix git-download) + (guix utils) + (guix packages) + ((guix licenses) #:prefix license:) + (guix build-system gnu)) + +(define vcs-file? + (or (git-predicate (current-source-directory)) + (const #t))) + +(define-public mcping + (package + (name "mcping") + (version "1.0") + (source (local-file "." "mcping-checkout" + #:recursive? #t + #:select? vcs-file?)) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ;; Tests require network. + #:make-flags + #~(list (string-append "CC=" #$(cc-for-target)) + (string-append "PREFIX=" #$output)) + #:phases #~(modify-phases %standard-phases + (delete 'configure)))) + (home-page "https://www.gnu.org/software/hello/") + (synopsis "C implementation of the Server List Ping from Minecraft.") + (description "Returns the result of a Server List Ping on a Minecraft server.") + (license license:agpl3+))) + +;; This allows you to run guix shell -f guix-packager.scm. +;; Remove this line if you just want to define a package. +mcping |