~kota/metweather

a4b54afa3786bd6be3edab564f030fa886940a84 — Dakota Walsh 1 year, 10 months ago 4769130
create makefile and man page
3 files changed, 80 insertions(+), 0 deletions(-)

A Makefile
A config.mk
A metweather.1.scd
A Makefile => Makefile +30 -0
@@ 0,0 1,30 @@
# metweather
# Copyright (C) 2021 Dakota Walsh
# GPL3+ See LICENSE in this repo for details.
.POSIX:

include config.mk

all: clean build

build:
	go build
	scdoc < metweather.1.scd | sed "s/VERSION/$(VERSION)/g" > metweather.1

clean:
	rm -f metweather
	rm -f metweather.1

install: build
	mkdir -p $(DESTDIR)$(PREFIX)/bin
	cp -f metweather $(DESTDIR)$(PREFIX)/bin
	chmod 755 $(DESTDIR)$(PREFIX)/bin/metweather
	mkdir -p $(DESTDIR)$(MANPREFIX)/man1
	cp -f metweather.1 $(DESTDIR)$(MANPREFIX)/man1/metweather.1
	chmod 644 $(DESTDIR)$(MANPREFIX)/man1/metweather.1

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/metweather
	rm -f $(DESTDIR)$(MANPREFIX)/man1/metweather.1

.PHONY: all build clean install uninstall

A config.mk => config.mk +10 -0
@@ 0,0 1,10 @@
# metweather
# Copyright (C) 2021 Dakota Walsh
# GPL3+ See LICENSE in this repo for details.
VERSION = 0.1.0

# Customize below to fit your system

# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man

A metweather.1.scd => metweather.1.scd +40 -0
@@ 0,0 1,40 @@
metweather(1) [""["metweather-VERSION"]]

# NAME

metweather - Display weather information from Metservice.

# SYNOPSIS

metweather <command> [flags]

# FLAGS

	*--config* _path_     
		config file (default is $XDG_CONFIG_HOME/.metweather.yaml)
	*-h, --help*
		help for metweather
	*-v, --version*
		version for metweather
	*-l, --location* _city_
		location used for the weather observation/forecast

# COMMANDS

	*observation*
		display current or past weather observations
	*forecast*
		display weather predictions for the current day or next serveral days

# AUTHORS

Maintained by Dakota Walsh <kota at nilsu.org>.
Up-to-date sources can be found at https://git.sr.ht/~kota/metweather

# COPYRIGHT

Copyright 2021 Dakota Walsh

License GPLv3+ GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.