aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2020-08-31 14:29:49 -0500
committerClark Williams <williams@redhat.com>2020-08-31 14:29:49 -0500
commit443a0eb6051315ccea1daea064dcb8e3f3ce5e75 (patch)
tree48f23abfad8efce59d8192cd9269b7b1d4431b98
parent6978452831912f0a5d5eacc922f129badf556247 (diff)
downloadstalld-443a0eb6051315ccea1daea064dcb8e3f3ce5e75.tar.gz
license: added license file and code to package it
Signed-off-by: Clark Williams <williams@redhat.com>
-rw-r--r--Makefile10
-rw-r--r--redhat/Makefile1
-rw-r--r--redhat/stalld.spec3
3 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 18e2641..21048ca 100644
--- a/Makefile
+++ b/Makefile
@@ -5,12 +5,14 @@ INSTALL=install
CFLAGS ?= -Wall -O2 -g
DIRS := src redhat man
-FILES := Makefile README.md
+FILES := Makefile README.md gpl-2.0.txt
TARBALL := $(NAME)-$(VERSION).tar.xz
UPSTREAM_TARBALLS := fedorapeople.org:~/public_html/
BINDIR := /usr/bin
-DOCDIR := /usr/share/doc
-MANDIR := /usr/share/man
+DATADIR := /usr/share
+DOCDIR := $(DATADIR)/doc
+MANDIR := $(DATADIR)/man
+LICDIR := $(DATADIR)/licenses
all: src/stalld.o
$(CC) -o stalld -ggdb -lpthread src/stalld.o
@@ -22,6 +24,8 @@ install:
$(INSTALL) README.md -m 644 $(DESTDIR)$(DOCDIR)
$(INSTALL) -m 755 -d $(DESTDIR)$(MANDIR)/man8
$(INSTALL) man/stalld.8 -m 644 $(DESTDIR)$(MANDIR)/man8
+ $(INSTALL) -m 755 -d $(DESTDIR)$(LICDIR)/$(NAME)
+ $(INSTALL) gpl-2.0.txt -m 644 $(DESTDIR)$(LICDIR)/$(NAME)
.PHONY: clean tarball redhat push
clean:
diff --git a/redhat/Makefile b/redhat/Makefile
index 9a40685..554f28d 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -10,6 +10,7 @@ RPMARGS := --define "_topdir $(HERE)" \
INSTALL := install
UPSTREAM_TARBALLS := fedorapeople.org:~/public_html/
UNITDIR := /usr/lib/systemd/system
+DATADIR := /usr/share
all: rpm
diff --git a/redhat/stalld.spec b/redhat/stalld.spec
index a073b25..55bf4cb 100644
--- a/redhat/stalld.spec
+++ b/redhat/stalld.spec
@@ -25,7 +25,7 @@ allow 10 microseconds of runtime for 1 second of clock time.
%make_build
%install
-%make_install DOCDIR=%{_docdir} MANDIR=%{_mandir} BINDIR=%{_bindir}
+%make_install DOCDIR=%{_docdir} MANDIR=%{_mandir} BINDIR=%{_bindir} DATADIR=%{_datadir}
%make_install -C redhat UNITDIR=%{_unitdir}
%files
@@ -34,6 +34,7 @@ allow 10 microseconds of runtime for 1 second of clock time.
%config(noreplace) /etc/sysconfig/stalld
%doc %{_docdir}/README.md
%doc %{_mandir}/man8/stalld.8*
+%license gpl-2.0.txt
%post
%systemd_post %{name}.service