| 1 |
# Module.mk - Makefile for a Linux module for reading sensor data. |
| 2 |
# Copyright (c) 1998, 1999 Frodo Looijaard <[email protected]> |
| 3 |
# |
| 4 |
# This program is free software; you can redistribute it and/or modify |
| 5 |
# it under the terms of the GNU General Public License as published by |
| 6 |
# the Free Software Foundation; either version 2 of the License, or |
| 7 |
# (at your option) any later version. |
| 8 |
# |
| 9 |
# This program is distributed in the hope that it will be useful, |
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
# GNU General Public License for more details. |
| 13 |
# |
| 14 |
# You should have received a copy of the GNU General Public License |
| 15 |
# along with this program; if not, write to the Free Software |
| 16 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
| 17 |
# MA 02110-1301 USA. |
| 18 |
|
| 19 |
# Note: Don't confuse ETC_DIR (the directory in which this file resides) |
| 20 |
# with ETCDIR (the system directory in which configuration files will be |
| 21 |
# installed; typically /etc). |
| 22 |
ETC_DIR := etc |
| 23 |
|
| 24 |
install-etc: |
| 25 |
$(MKDIR) $(DESTDIR)$(ETCDIR) $(DESTDIR)$(ETCDIR)/sensors.d |
| 26 |
if [ ! -e $(DESTDIR)$(ETCDIR)/sensors3.conf ] ; then \ |
| 27 |
$(INSTALL) -m 644 $(ETC_DIR)/sensors.conf.default $(DESTDIR)$(ETCDIR)/sensors3.conf ; \ |
| 28 |
fi |
| 29 |
$(MKDIR) $(DESTDIR)$(BINDIR) |
| 30 |
$(INSTALL) -m 755 $(ETC_DIR)/sensors-conf-convert $(DESTDIR)$(BINDIR) |
| 31 |
if [ -e $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors \ |
| 32 |
-a ! -e $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors.conf ] ; then \ |
| 33 |
$(MV) $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors.conf ; \ |
| 34 |
fi |
| 35 |
$(MKDIR) $(DESTDIR)$(MANDIR)/man8 |
| 36 |
$(INSTALL) -m 644 $(ETC_DIR)/sensors-conf-convert.8 $(DESTDIR)$(MANDIR)/man8 |
| 37 |
|
| 38 |
user_install :: install-etc |
| 39 |
|
| 40 |
uninstall-etc: |
| 41 |
$(RM) $(DESTDIR)$(BINDIR)/sensors-conf-convert |
| 42 |
$(RM) $(DESTDIR)$(MANDIR)/man8/sensors-conf-convert.8 |
| 43 |
|
| 44 |
user_uninstall :: uninstall-etc |