]>
Commit | Line | Data |
---|---|---|
1 | ############################################################################### | |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
4 | # Copyright (C) 2007-2024 IPFire Team <info@ipfire.org> # | |
5 | # # | |
6 | # This program is free software: you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation, either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # This program is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
18 | # # | |
19 | ############################################################################### | |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
27 | SUMMARY = Video Disk Recorder | |
28 | ||
29 | VER = 2.6.6 | |
30 | ||
31 | # VDRPLUGVER must match with APIVERSION! in config.h | |
32 | # after change this update also all vdr plugins | |
33 | VDRPLUGVER = 2.6.6 | |
34 | ||
35 | THISAPP = vdr-$(VER) | |
36 | DL_FILE = $(THISAPP).tar.bz2 | |
37 | ||
38 | DL_FROM = $(URL_IPFIRE) | |
39 | DIR_APP = $(DIR_SRC)/$(THISAPP) | |
40 | TARGET = $(DIR_INFO)/$(THISAPP) | |
41 | PROG = vdr | |
42 | PAK_VER = 16 | |
43 | ||
44 | DEPS = vdr_streamdev | |
45 | ||
46 | SERVICES = vdr | |
47 | ||
48 | CXXFLAGS += -std=c++11 | |
49 | ||
50 | MAKE_OPTIONS = \ | |
51 | PREFIX=/usr \ | |
52 | BINDIR=/usr/bin \ | |
53 | CACHEDIR=/var/cache/vdr \ | |
54 | CONFDIR=/etc/vdr \ | |
55 | INCDIR=/usr/include \ | |
56 | LIBDIR=/usr/lib/vdr \ | |
57 | LOCDIR=/usr/share/locale \ | |
58 | MANDIR=/usr/share/man \ | |
59 | RESDIR=/usr/share/vdr \ | |
60 | RUNDIR=/var/run \ | |
61 | VARDIR=/var \ | |
62 | VIDEODIR=/var/video \ | |
63 | CFLAGS="$(CFLAGS)" \ | |
64 | CXXFLAGS="$(CXXFLAGS)" | |
65 | ||
66 | ############################################################################### | |
67 | # Top-level Rules | |
68 | ############################################################################### | |
69 | ||
70 | objects = $(DL_FILE) | |
71 | ||
72 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
73 | ||
74 | $(DL_FILE)_BLAKE2 = 22ad6d0d4048347ff16a48ad137900f32dda7adfc7fb54bb1501f14cfc426185f942ffa4997de1e0318ca8c6b67a7dfc48d49b30bfda9367d7337b2d601544fc | |
75 | ||
76 | install : $(TARGET) | |
77 | ||
78 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
79 | ||
80 | download : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
81 | ||
82 | b2 : $(subst %,%_BLAKE2,$(objects)) | |
83 | ||
84 | dist: | |
85 | @$(PAK) | |
86 | ||
87 | ############################################################################### | |
88 | # Downloading, checking, b2sum | |
89 | ############################################################################### | |
90 | ||
91 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
92 | @$(CHECK) | |
93 | ||
94 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
95 | @$(LOAD) | |
96 | ||
97 | $(subst %,%_BLAKE2,$(objects)) : | |
98 | @$(B2SUM) | |
99 | ||
100 | ############################################################################### | |
101 | # Installation Details | |
102 | ############################################################################### | |
103 | ||
104 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
105 | @$(PREBUILD) | |
106 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) | |
107 | ||
108 | # Compile main package. | |
109 | cd $(DIR_APP) && make $(MAKE_OPTIONS) $(MAKETUNING) vdr include-dir | |
110 | ||
111 | # Compile bundled plugins. | |
112 | #cd $(DIR_APP) && for plugin in ...; do \ | |
113 | # make $(MAKETUNING) -C PLUGINS/src/$$plugin VDRDIR=$(DIR_APP) \ | |
114 | # CFLAGS="$(CFLAGS) -I$(DIR_APP)/include" \ | |
115 | # CXXFLAGS="$(CXXFLAGS) -I$(DIR_APP)/include" \ | |
116 | # PLGCFG=$(DIR_APP)/plugins.mk all || exit 1; \ | |
117 | #done | |
118 | ||
119 | # Install main package. | |
120 | cd $(DIR_APP) && make install-bin install-dirs install-includes $(MAKE_OPTIONS) | |
121 | mv -v /usr/bin/vdr /usr/sbin/vdr | |
122 | ||
123 | sed -e "s/VDR_PLUGIN_VERSION/$(VDRPLUGVER)/" \ | |
124 | < $(DIR_SRC)/config/vdr/runvdr > /usr/sbin/runvdr | |
125 | chmod 755 /usr/sbin/runvdr | |
126 | ||
127 | # Install configuration. | |
128 | mkdir -pv /etc/vdr | |
129 | mkdir -pv /etc/sysconfig/vdr-plugins.d | |
130 | cd $(DIR_APP) && install -m 644 $(DIR_SRC)/config/vdr/vdr.sysconfig \ | |
131 | /etc/sysconfig/vdr | |
132 | cd $(DIR_APP) && install -m 644 *.conf /etc/vdr | |
133 | ||
134 | # Link development files. | |
135 | mkdir -pv /usr/lib/vdr | |
136 | cd $(DIR_APP) && cp -vf Make.global /usr/lib/vdr | |
137 | ln -svf ../../include/vdr/config.h /usr/lib/vdr/config.h | |
138 | ln -svf ../../include/vdr/device.h /usr/lib/vdr/device.h | |
139 | ||
140 | #install initscripts | |
141 | $(call INSTALL_INITSCRIPTS,$(SERVICES)) | |
142 | ||
143 | # Install start links and backup include file. | |
144 | ln -sf ../init.d/vdr /etc/rc.d/rc3.d/S60vdr | |
145 | ln -sf ../init.d/vdr /etc/rc.d/rc0.d/K40vdr | |
146 | ln -sf ../init.d/vdr /etc/rc.d/rc6.d/K40vdr | |
147 | install -v -m 644 $(DIR_SRC)/config/backup/includes/vdr \ | |
148 | /var/ipfire/backup/addons/includes/vdr | |
149 | ||
150 | @rm -rf $(DIR_APP) | |
151 | @$(POSTBUILD) |