qclib/0001-introduce-DOCDIR.patch

53 lines
2.0 KiB
Diff
Raw Normal View History

2020-04-22 08:12:25 +00:00
From f9f4404f0ee2f788d7ff195a50322a5480d72fed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Wed, 22 Apr 2020 09:51:22 +0200
Subject: [PATCH 1/2] introduce DOCDIR
With a DOCDIR variable in the Makefile the distributions can set the docs
location to their preferred place.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1306280
---
Makefile | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 9f48fcb..700783a 100644
--- a/Makefile
+++ b/Makefile
2017-01-06 13:43:18 +00:00
@@ -6,6 +6,7 @@
# bugfix: Bugfixes only
2020-04-22 08:12:25 +00:00
VERSION = 2.1.0
2017-12-04 13:53:25 +00:00
VERM = $(shell echo $(VERSION) | cut -d '.' -f 1)
2017-01-06 13:43:18 +00:00
+DOCDIR ?= /usr/share/doc/packages/
CFLAGS ?= -g -Wall -O2
2020-04-22 08:12:25 +00:00
CFILES = query_capacity.c query_capacity_data.c query_capacity_sysinfo.c \
query_capacity_sysfs.c query_capacity_hypfs.c query_capacity_sthyi.c
@@ -72,16 +73,16 @@ install: libqc.a libqc.so.$(VERSION)
2017-01-06 13:43:18 +00:00
ln -sr $(DESTDIR)/usr/lib64/libqc.so.$(VERSION) $(DESTDIR)/usr/lib64/libqc.so.$(VERM)
ln -sr $(DESTDIR)/usr/lib64/libqc.so.$(VERSION) $(DESTDIR)/usr/lib64/libqc.so
install -Dm 644 query_capacity.h $(DESTDIR)/usr/include/query_capacity.h
- install -Dm 644 README $(DESTDIR)/usr/share/doc/packages/qclib/README
- install -Dm 644 LICENSE $(DESTDIR)/usr/share/doc/packages/qclib/LICENSE
+ install -Dm 644 README $(DESTDIR)/$(DOCDIR)/qclib/README
+ install -Dm 644 LICENSE $(DESTDIR)/$(DOCDIR)/qclib/LICENSE
installdoc: doc
echo " INSTALLDOC"
- install -dm 755 $(DESTDIR)/usr/share/doc/packages/qclib/html
- cp -r html/* $(DESTDIR)/usr/share/doc/packages/qclib/html
- chmod 644 $(DESTDIR)/usr/share/doc/packages/qclib/html/search/*
- chmod 644 $(DESTDIR)/usr/share/doc/packages/qclib/html/*
- chmod 755 $(DESTDIR)/usr/share/doc/packages/qclib/html/search
+ install -dm 755 $(DESTDIR)/$(DOCDIR)/qclib/html
+ cp -r html/* $(DESTDIR)/$(DOCDIR)/qclib/html
+ chmod 644 $(DESTDIR)/$(DOCDIR)/qclib/html/search/*
+ chmod 644 $(DESTDIR)/$(DOCDIR)/qclib/html/*
+ chmod 755 $(DESTDIR)/$(DOCDIR)/qclib/html/search
clean:
echo " CLEAN"
2020-04-22 08:12:25 +00:00
--
2.21.1