-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
174 lines (141 loc) · 4.23 KB
/
Makefile.am
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# Perl Audio Converter
#
# Copyright (C) 2005-2018 Philip Lyons ([email protected])
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
ACLOCAL_M4 = ./aclocal.m4
#
# Modules & Documentation
#
DOCS = INSTALL README AUTHORS TODO NEWS ChangeLog COPYING
LANG_MODS = po/*
EXTRAS = extra/*
#
# Plugin directories
#
NAUTILUS_PLUGIN_DIR = plugins/gnome/nautilus
NEMO_PLUGIN_DIR = plugins/gnome/nemo
KDE_PLUGIN_DIR = plugins/kde
#
# Default KDE directory
#
DESTDIR =
KDEDIR = /usr
GNOMEDIR = /usr
#
# Target KDE directories
#
KDE_INSTALL_DIR = $(DESTDIR)$(KDEDIR)/share/kde4/services
NAUTILUS_INSTALL_DIR = $(DESTDIR)$(HOME)/.local/share/nautilus/scripts
NEMO_INSTALL_DIR = $(DESTDIR)$(GNOMEDIR)/share/nemo/actions
ICON_DIR = $(DESTDIR)$(GNOMEDIR)/share/icons
#
# Compiler tools definitions...
#
POD2MAN = @POD2MAN@
POD2HTML = @POD2HTML@
GZIP = @GZIP@
RM = @RM@ -f
SHELL = /bin/sh
#
# Configuration files directories and other
#
CONF_DIR = $(DESTDIR)$(sysconfdir)/$(PACKAGE_NAME)
PO_DIR = $(DESTDIR)$(pkgdatadir)/locale
MOD_DIR = $(CONF_DIR)/modules
DOC_DIR = $(DESTDIR)$(docdir)
MAN_DIR = $(DESTDIR)$(mandir)/man1
EXTRA_DIR = $(CONF_DIR)/extra
edit = sed \
-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g'
all : pacpl.1.gz
pacpl: pacpl.in Makefile
rm -f $@ [email protected]
$(edit) '[email protected]' >[email protected]
mv [email protected] $@
chmod +x $@
pacpl.1.gz : pacpl
$(POD2MAN) $< | $(GZIP) -9 > $@
touch $@
install: all main install-plugins
main:
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) -d $(CONF_DIR)
$(INSTALL) -d $(PO_DIR)
$(INSTALL) -d $(MOD_DIR)
$(INSTALL) -d $(MAN_DIR)
$(INSTALL) -d $(DOC_DIR)
$(INSTALL) -d $(EXTRA_DIR)
$(INSTALL) pacpl $(DESTDIR)$(bindir)
$(INSTALL_DATA) pacpl.conf codecs.conf pacpl.png $(CONF_DIR)
$(INSTALL_DATA) $(LANG_MODS) $(PO_DIR)
$(INSTALL_DATA) pacpl.1.gz $(MAN_DIR)
$(INSTALL_DATA) $(DOCS) $(DOC_DIR)
$(INSTALL_DATA) $(EXTRAS) $(EXTRA_DIR)
install-plugins:
if INSTALL_KDE
$(INSTALL) -d $(KDE_INSTALL_DIR)
$(INSTALL) $(KDE_PLUGIN_DIR)/PACPL-Konvert $(DESTDIR)$(bindir)
$(INSTALL_DATA) $(KDE_PLUGIN_DIR)/pacpl.desktop $(KDE_INSTALL_DIR)
sed -i 's/KDE_DIR = 0/KDE_DIR = 1/' $(CONF_DIR)/pacpl.conf
sed -i 's/KDE_OPTS = 0/KDE_OPTS = 1/' $(CONF_DIR)/pacpl.conf
endif
if INSTALL_NAUTILUS
$(INSTALL) -d $(NAUTILUS_INSTALL_DIR)
$(INSTALL) $(NAUTILUS_PLUGIN_DIR)/PACPL-Convert $(NAUTILUS_INSTALL_DIR)
endif
if INSTALL_NEMO
$(INSTALL) -d $(NEMO_INSTALL_DIR)
$(INSTALL) $(NEMO_PLUGIN_DIR)/PACPL-Convert $(NEMO_INSTALL_DIR)
$(INSTALL_DATA) $(NEMO_PLUGIN_DIR)/pacpl.nemo_action $(NEMO_INSTALL_DIR)
$(INSTALL_DATA) $(NEMO_PLUGIN_DIR)/pacpl.png $(ICON_DIR)
endif
if ENABLE_GNOME_NAUTILUS
sed -i 's/ZEN_DIR = 0/ZEN_DIR = 1/' $(CONF_DIR)/pacpl.conf
sed -i 's/ZEN_OPTS = 0/ZEN_OPTS = 1/' $(CONF_DIR)/pacpl.conf
endif
if ENABLE_GNOME_NEMO
sed -i 's/ZEN_DIR = 0/ZEN_DIR = 1/' $(CONF_DIR)/pacpl.conf
sed -i 's/ZEN_OPTS = 0/ZEN_OPTS = 1/' $(CONF_DIR)/pacpl.conf
endif
clean:
$(RM) pacpl.1.gz
distclean: clean
$(RM) config.log
$(RM) config.status
$(RM) Makefile
$(RM) pacpl
find . -name '*~' -exec $(RM) '{}' \;
uninstall: uninstall-plugins
$(RM) $(DESTDIR)$(bindir)/pacpl
$(RM) $(MAN_DIR)/pacpl.1.gz
$(RM) -r $(CONF_DIR)
$(RM) -r $(DOC_DIR)
$(RM) -r $(DESTDIR)$(pkgdatadir)
uninstall-plugins:
if INSTALL_KDE
$(RM) $(KDE_INSTALL_DIR)/pacpl.desktop
$(RM) $(DESTDIR)$(bindir)/PACPL-Konvert
endif
if INSTALL_NAUTILUS
$(RM) $(NAUTILUS_INSTALL_DIR)/PACPL-Convert
endif
if INSTALL_NEMO
$(RM) $(NEMO_INSTALL_DIR)/PACPL-Convert
$(RM) $(NEMO_INSTALL_DIR)/pacpl.nemo_action
$(RM) $(ICON_DIR)/pacpl.png
endif