]>
Commit | Line | Data |
---|---|---|
debeaeaa AF |
1 | ############################################################################### |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
f3ff2748 | 4 | # Copyright (C) 2007-2012 IPFire Team <info@ipfire.org> # |
debeaeaa AF |
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 | ||
d2be7786 | 27 | VER = 1.7.41 |
debeaeaa AF |
28 | THISAPP = vdr-$(VER) |
29 | DL_FILE = $(THISAPP).tar.bz2 | |
98248635 | 30 | |
debeaeaa AF |
31 | DL_FROM = $(URL_IPFIRE) |
32 | DIR_APP = $(DIR_SRC)/$(THISAPP) | |
33 | TARGET = $(DIR_INFO)/$(THISAPP) | |
34 | PROG = vdr | |
d2be7786 | 35 | PAK_VER = 6 |
debeaeaa | 36 | |
c435d7dc | 37 | DEPS = "freefont vdr-streamdev" |
debeaeaa | 38 | |
d2be7786 MT |
39 | MAKE_OPTIONS = \ |
40 | PREFIX=/usr \ | |
41 | BINDIR=/usr/bin \ | |
42 | CACHEDIR=/var/cache/vdr \ | |
43 | CONFDIR=/etc/vdr \ | |
c435d7dc | 44 | INCDIR=/usr/include \ |
d2be7786 MT |
45 | LIBDIR=/usr/lib/vdr \ |
46 | LOCDIR=/usr/share/locale \ | |
47 | MANDIR=/usr/share/man \ | |
48 | RESDIR=/usr/share/vdr \ | |
49 | RUNDIR=/var/run \ | |
50 | VARDIR=/var \ | |
51 | VIDEODIR=/var/video \ | |
52 | CFLAGS="$(CFLAGS)" \ | |
53 | CXXFLAGS="$(CXXFLAGS)" | |
54 | ||
debeaeaa AF |
55 | ############################################################################### |
56 | # Top-level Rules | |
57 | ############################################################################### | |
58 | ||
d2be7786 | 59 | objects = $(DL_FILE) |
debeaeaa | 60 | |
d2be7786 | 61 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) |
debeaeaa | 62 | |
d2be7786 | 63 | $(DL_FILE)_MD5 = c7928bff45fa1c0e6dadf2c0a5adf94b |
debeaeaa AF |
64 | |
65 | install : $(TARGET) | |
66 | ||
67 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
68 | ||
98248635 | 69 | download : $(patsubst %,$(DIR_DL)/%,$(objects)) |
debeaeaa AF |
70 | |
71 | md5 : $(subst %,%_MD5,$(objects)) | |
72 | ||
73 | dist: | |
74 | @$(PAK) | |
75 | ||
76 | ############################################################################### | |
77 | # Downloading, checking, md5sum | |
78 | ############################################################################### | |
79 | ||
80 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
81 | @$(CHECK) | |
82 | ||
83 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
84 | @$(LOAD) | |
85 | ||
86 | $(subst %,%_MD5,$(objects)) : | |
87 | @$(MD5) | |
88 | ||
89 | ############################################################################### | |
90 | # Installation Details | |
91 | ############################################################################### | |
92 | ||
93 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
94 | @$(PREBUILD) | |
95 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) | |
cc24c14b | 96 | |
d2be7786 MT |
97 | # Compile main package. |
98 | cd $(DIR_APP) && make $(MAKE_OPTIONS) $(MAKETUNING) vdr include-dir | |
99 | ||
100 | # Compile bundled plugins. | |
101 | #cd $(DIR_APP) && for plugin in ...; do \ | |
102 | # make $(MAKETUNING) -C PLUGINS/src/$$plugin VDRDIR=$(DIR_APP) \ | |
103 | # CFLAGS="$(CFLAGS) -I$(DIR_APP)/include" \ | |
104 | # CXXFLAGS="$(CXXFLAGS) -I$(DIR_APP)/include" \ | |
105 | # PLGCFG=$(DIR_APP)/plugins.mk all || exit 1; \ | |
106 | #done | |
107 | ||
108 | # Install main package. | |
109 | cd $(DIR_APP) && make install-bin install-dirs install-includes $(MAKE_OPTIONS) | |
110 | mv -v /usr/bin/vdr /usr/sbin/vdr | |
111 | ||
112 | sed -e "s/VDR_PLUGIN_VERSION/$(VER)/" \ | |
113 | < $(DIR_SRC)/config/vdr/runvdr > /usr/sbin/runvdr | |
114 | chmod 755 /usr/sbin/runvdr | |
115 | ||
116 | # Install configuration. | |
117 | mkdir -pv /etc/vdr | |
118 | mkdir -pv /etc/sysconfig/vdr-plugins.d | |
90dc87b7 MT |
119 | cd $(DIR_APP) && install -m 644 $(DIR_SRC)/config/vdr/vdr.sysconfig \ |
120 | /etc/sysconfig/vdr | |
d2be7786 MT |
121 | cd $(DIR_APP) && install -m 644 *.conf /etc/vdr |
122 | ||
90dc87b7 MT |
123 | # Link development files. |
124 | mkdir -pv /usr/lib/vdr | |
125 | cd $(DIR_APP) && cp -vf Make.global /usr/lib/vdr | |
126 | ln -svf ../../include/vdr/config.h /usr/lib/vdr/config.h | |
127 | ln -svf ../../include/vdr/device.h /usr/lib/vdr/device.h | |
128 | ||
d2be7786 | 129 | # Install start links and backup include file. |
0e07ae54 AF |
130 | ln -sf ../init.d/vdr /etc/rc.d/rc3.d/S60vdr |
131 | ln -sf ../init.d/vdr /etc/rc.d/rc0.d/K40vdr | |
132 | ln -sf ../init.d/vdr /etc/rc.d/rc6.d/K40vdr | |
2a8c4fcb | 133 | install -v -m 644 $(DIR_SRC)/config/backup/includes/vdr \ |
d2be7786 | 134 | /var/ipfire/backup/addons/includes/vdr |
cc24c14b | 135 | |
debeaeaa AF |
136 | @rm -rf $(DIR_APP) |
137 | @$(POSTBUILD) |