Skip to content

Commit 7208723

Browse files
committed
[fix 80] New man page and Makefile from 'JR1994-master'
2 parents adccefb + 6457160 commit 7208723

3 files changed

Lines changed: 22 additions & 8 deletions

File tree

Makefile

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ OUTPUT_PATH = bin/
66
SOURCE_PATH = src/
77
EXE = bin/mbpfan
88
CONF = mbpfan.conf
9+
DOC = README.md
10+
MAN = mbpfan.8.gz
911

1012
ifeq ($(COMPILER), G++)
1113
ifeq ($(OS),Windows_NT)
@@ -23,8 +25,8 @@ ifeq ($(COMPILER), G++)
2325
LIBS = -lm
2426
# LIBPATH = -L../gc/.libs
2527
LIBPATH =
26-
CPPFLAGS = $(COPT) -g $(INCLUDES)
27-
LDFLAGS = $(LIBPATH) -g $(LIBS)
28+
CPPFLAGS += $(COPT) -g $(INCLUDES) #-Wall
29+
LDFLAGS += $(LIBPATH) -g $(LIBS) #-Wall
2830
DEP = dep
2931
else
3032
OBJ = obj
@@ -61,17 +63,27 @@ tests:
6163
uninstall:
6264
rm /usr/sbin/mbpfan
6365
rm /etc/mbpfan.conf
66+
rm /lib/systemd/system/mbpfan.service
67+
rm /usr/share/man/man8/mbpfan.8.gz
68+
rm -rf /usr/share/doc/mbpfan
6469

6570
install:
6671
make
67-
cp $(EXE) /usr/sbin
68-
cp -n $(CONF) /etc
72+
install -d $(DESTDIR)/usr/sbin
73+
install -d $(DESTDIR)/etc
74+
install -d $(DESTDIR)/lib/systemd/system
75+
install -d $(DESTDIR)/usr/share/doc/mbpfan
76+
install $(EXE) $(DESTDIR)/usr/sbin
77+
install -m644 $(CONF) $(DESTDIR)/etc
78+
install -m644 $(DOC) $(DESTDIR)/usr/share/doc/mbpfan
79+
install -d $(DESTDIR)/usr/share/man/man8
80+
install -m644 $(MAN) $(DESTDIR)/usr/share/man/man8
6981
@echo ""
7082
@echo "******************"
7183
@echo "INSTALL COMPLETED"
7284
@echo "******************"
7385
@echo ""
74-
@echo "A configuration file has been copied to /etc/mbpfan.conf"
86+
@echo "A configuration file has been copied (might overwrite existing file) to /etc/mbpfan.conf."
7587
@echo "See README.md file to have mbpfan automatically started at system boot."
7688
@echo ""
7789
@echo "Please run the tests now with the command"

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Fan-Control-Daemon
1+
mbpfan
22
====================
33

44
Introduction
55
---------------------
66
This is an enhanced version of [Allan McRae mbpfan](http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon/)
77

8-
Fan-Control-Daemon is a daemon that uses input from coretemp module and sets the fan speed using the applesmc module.
8+
mbpfan is a daemon that uses input from coretemp module and sets the fan speed using the applesmc module.
99
This enhanced version assumes any number of processors and fans (max. 10).
1010

1111
* It only uses the temperatures from the processors as input.
@@ -52,6 +52,7 @@ Tested iMac/Mini Models
5252
------------------
5353
This section reports the iMac/Mac-mini models where mbpfan was tested successfully.
5454

55+
- iMac Retina 16.2 21.5" (Intel i5 - Linux 4.4.0 Ubuntu 16.04)
5556
- iMac 12,1 21.5" (Intel i7 - Linux 4.6.4)
5657
- iMac 5,1 17" (Intel T7400 (Core 2 Duo) - Linux 14.04 Ubuntu)
5758
- Mac Mini 2,1 (Core 2 Duo - Linux 4.4.0)
@@ -102,7 +103,8 @@ Install with
102103

103104
sudo make install
104105

105-
It copies mbpfan to /usr/sbin and mbpfan.conf to /etc
106+
It copies mbpfan to /usr/sbin, mbpfan.conf to /etc,
107+
README.md to /usr/share/doc/mbpfan, and mbpfan.8.gz to /usr/share/man/man8
106108

107109

108110
Run The Tests (Recommended)

mbpfan.8.gz

595 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)