]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/vdr
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / lfs / vdr
CommitLineData
debeaeaa
AF
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
cbf32e7d 4# Copyright (C) 2007-2024 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
25include Config
26
f15707c7
RR
27SUMMARY = Video Disk Recorder
28
cbf32e7d 29VER = 2.6.6
78403883 30
8372d890 31# VDRPLUGVER must match with APIVERSION! in config.h
78403883 32# after change this update also all vdr plugins
cbf32e7d 33VDRPLUGVER = 2.6.6
78403883 34
debeaeaa
AF
35THISAPP = vdr-$(VER)
36DL_FILE = $(THISAPP).tar.bz2
98248635 37
debeaeaa
AF
38DL_FROM = $(URL_IPFIRE)
39DIR_APP = $(DIR_SRC)/$(THISAPP)
40TARGET = $(DIR_INFO)/$(THISAPP)
41PROG = vdr
394405b1 42PAK_VER = 17
5e23cb6c 43
2dc2a278 44DEPS = vdr_streamdev
debeaeaa 45
f15707c7
RR
46SERVICES = vdr
47
40e9fa27
MT
48CXXFLAGS += -std=c++11
49
d2be7786
MT
50MAKE_OPTIONS = \
51 PREFIX=/usr \
52 BINDIR=/usr/bin \
53 CACHEDIR=/var/cache/vdr \
54 CONFDIR=/etc/vdr \
c435d7dc 55 INCDIR=/usr/include \
d2be7786
MT
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
debeaeaa
AF
66###############################################################################
67# Top-level Rules
68###############################################################################
69
d2be7786 70objects = $(DL_FILE)
debeaeaa 71
ece4c8cd 72$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
debeaeaa 73
cbf32e7d 74$(DL_FILE)_BLAKE2 = 22ad6d0d4048347ff16a48ad137900f32dda7adfc7fb54bb1501f14cfc426185f942ffa4997de1e0318ca8c6b67a7dfc48d49b30bfda9367d7337b2d601544fc
debeaeaa
AF
75
76install : $(TARGET)
77
78check : $(patsubst %,$(DIR_CHK)/%,$(objects))
79
98248635 80download : $(patsubst %,$(DIR_DL)/%,$(objects))
debeaeaa 81
9a7e4d85 82b2 : $(subst %,%_BLAKE2,$(objects))
debeaeaa 83
66c36198 84dist:
debeaeaa
AF
85 @$(PAK)
86
87###############################################################################
9a7e4d85 88# Downloading, checking, b2sum
debeaeaa
AF
89###############################################################################
90
91$(patsubst %,$(DIR_CHK)/%,$(objects)) :
92 @$(CHECK)
93
94$(patsubst %,$(DIR_DL)/%,$(objects)) :
95 @$(LOAD)
96
9a7e4d85
PM
97$(subst %,%_BLAKE2,$(objects)) :
98 @$(B2SUM)
debeaeaa
AF
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)
cc24c14b 107
d2be7786
MT
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
08434343 123 sed -e "s/VDR_PLUGIN_VERSION/$(VDRPLUGVER)/" \
d2be7786
MT
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
90dc87b7
MT
130 cd $(DIR_APP) && install -m 644 $(DIR_SRC)/config/vdr/vdr.sysconfig \
131 /etc/sysconfig/vdr
d2be7786
MT
132 cd $(DIR_APP) && install -m 644 *.conf /etc/vdr
133
90dc87b7
MT
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
f09be2a5 140 #install initscripts
f15707c7 141 $(call INSTALL_INITSCRIPTS,$(SERVICES))
f09be2a5 142
d2be7786 143 # Install start links and backup include file.
0e07ae54
AF
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
2a8c4fcb 147 install -v -m 644 $(DIR_SRC)/config/backup/includes/vdr \
d2be7786 148 /var/ipfire/backup/addons/includes/vdr
cc24c14b 149
debeaeaa
AF
150 @rm -rf $(DIR_APP)
151 @$(POSTBUILD)