-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
105 lines (90 loc) · 3.54 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
################################################################################
# Makefile - Makefile for installing systemd-axia-alsa
################################################################################
#
# Copyright (C) 2017 Radio Bern RaBe
# Switzerland
# http://www.rabe.ch
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public
# License as published by the Free Software Foundation, version
# 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
# Please submit enhancements, bugfixes or comments via:
# https://github.com/radiorabe/systemd-axia-alsa
#
# Authors:
# Christian Affolter <[email protected]>
PN = systemd-axia-alsa
# Standard commands according to
# https://www.gnu.org/software/make/manual/html_node/Makefile-Conventions.html
SHELL = /bin/sh
INSTALL = /usr/bin/install
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
# Standard directories according to
# https://www.gnu.org/software/make/manual/html_node/Directory-Variables.html#Directory-Variables
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
datarootdir = $(prefix)/share
datadir = $(datarootdir)
docdir = $(datarootdir)/doc/$(PN)
sbindir = $(exec_prefix)/sbin
sysconfdir = $(prefix)/etc
libdir = $(exec_prefix)/lib
# Systemd directories
system_unitdir = $(exec_prefix)/systemd/system
user_unitdir = ${sysconfdir}/systemd/system
unitdir = ${user_unitdir}
# udev directories
system_udevdir = $(libdir)/udev
system_udevrulesdir = $(system_udevdir)/rules.d
user_udevdir = $(sysconfdir)/udev
user_udevrulesdir = $(user_udevdir)/rules.d
udevdir = $(system_udevdir)
udevrulesdir = $(user_udevrulesdir)
# firewalld directories
system_firewallddir = $(libdir)/firewalld
system_firewalldservicesdir = $(system_firewallddir)/services
user_firewallddir = $(sysconfdir)/firewalld
user_firewalldservicesdir = $(user_firewallddir)/services
firewallddir = $(user_firewallddir)
firewalldservicesdir = $(firewallddir)/services
# Kernel auto module loading and configuration directories
modulesloaddir = $(sysconfdir)/modules-load.d
modeprobedir = $(sysconfdir)/modprobe.d
# Axia configuration directory
axiaconfdir= ${sysconfdir}/axia
.PHONY: all
all:
.PHONY: installdirs
installdirs:
$(INSTALL) -d $(DESTDIR)$(axiaconfdir) \
$(DESTDIR)$(docdir) \
$(DESTDIR)$(firewalldservicesdir) \
$(DESTDIR)$(modeprobedir) \
$(DESTDIR)$(modulesloaddir) \
$(DESTDIR)$(udevdir) \
$(DESTDIR)$(udevrulesdir) \
$(DESTDIR)$(unitdir)
.PHONY: install
install: all installdirs
$(INSTALL_DATA) systemd/*.service $(DESTDIR)$(unitdir)/
$(INSTALL_DATA) systemd/systemd-env.conf $(DESTDIR)$(axiaconfdir)/
$(INSTALL_PROGRAM) udev/snd-axia.sh $(DESTDIR)$(udevdir)/
$(INSTALL_DATA) udev/90-snd-axia.rules $(DESTDIR)$(udevrulesdir)/
$(INSTALL_DATA) firewalld/services/*.xml $(DESTDIR)$(firewalldservicesdir)/
$(INSTALL_DATA) modules-load.d/snd-axia.conf $(DESTDIR)$(modulesloaddir)/
$(INSTALL_DATA) modprobe.d/snd-axia.conf $(DESTDIR)$(modeprobedir)/
$(INSTALL_DATA) README.md $(DESTDIR)$(docdir)/