Ticket #9591: Makefile

File Makefile, 5.2 KB (added by ack, 7 years ago)
Line 
1#
2# Copyright (C) 2006-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=dvb-apps
11PKG_REV:=51b143ddd8ad
12PKG_VERSION:=r$(PKG_REV)
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=http://linuxtv.org/hg/dvb-apps
17PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18PKG_SOURCE_VERSION:=$(PKG_REV)
19PKG_SOURCE_PROTO:=hg
20
21PKG_INSTALL:=1
22
23include $(INCLUDE_DIR)/package.mk
24include $(INCLUDE_DIR)/nls.mk
25
26define Package/dvb-apps/Default
27  SECTION:=multimedia
28  CATEGORY:=Multimedia
29  TITLE:=Linux DVB
30  URL:=http://linuxtv.org/
31endef
32
33define Package/dvb-apps/description/Default
34  Linux DVB API applications and utilities.
35endef
36
37
38define Package/dvb-apps
39  $(call Package/dvb-apps/Default)
40  TITLE+= Applications
41  DEPENDS+= $(DVBA_DEPENDS)
42endef
43
44define Package/dvb-apps/description
45  $(call Package/dvb-apps/description/Default)
46  .
47  This meta-package contains only dependencies to all Linux DVB API
48  applications, libraries and data.
49endef
50
51define Package/dvb-apps/install
52        /bin/true
53endef
54
55
56# 1: short name
57# 2: description
58# 3: dependencies on other Linux DVB API libraries (short name)
59# 4: dependencies on other Linux DVB API applications (short name)
60# 5: dependencies on other packages
61define DvbBuildApp
62
63  DVBA_DEPENDS += +dvb-app-$(1)
64
65  define Package/dvb-app-$(1)
66    $(call Package/dvb-apps/Default)
67    TITLE+= $(2) application
68    DEPENDS+= $$(foreach p,$(3),+lib$$(p)) $$(foreach p,$(4),+dvb-app-$$(p)) $(5)
69  endef
70
71  define Package/dvb-app-$(1)/description
72   $(call Package/dvb-apps/description/Default)
73   .
74   This package contains the Linux DVB $(2) application.
75  endef
76
77  define Package/dvb-app-$(1)/install
78        $(INSTALL_DIR) $$(1)/usr/bin
79        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin
80  endef
81
82  $$(eval $$(call BuildPackage,dvb-app-$(1)))
83endef
84
85$(eval $(call DvbBuildApp,atsc_epg,atsc_epg,dvbapi ucsi,,))
86$(eval $(call DvbBuildApp,av7110_loadkeys,av7110_loadkeys,,,))
87$(eval $(call DvbBuildApp,azap,azap,,,))
88$(eval $(call DvbBuildApp,czap,czap,,,))
89$(eval $(call DvbBuildApp,dib3000-watch,dib3000-watch,,,))
90$(eval $(call DvbBuildApp,dst_test,dst_test,,,))
91$(eval $(call DvbBuildApp,dvbdate,dvbdate,dvbapi ucsi,,))
92$(eval $(call DvbBuildApp,dvbnet,dvbnet,dvbapi,,))
93$(eval $(call DvbBuildApp,dvbscan,dvbscan,dvbcfg ucsi dvbsec dvbapi,,libpthread))
94$(eval $(call DvbBuildApp,dvbtraffic,dvbtraffic,dvbapi,,))
95$(eval $(call DvbBuildApp,femon,femon,dvbapi,,))
96$(eval $(call DvbBuildApp,gnutv,gnutv,dvbcfg dvben50221 ucsi dvbsec dvbapi,,libpthread))
97$(eval $(call DvbBuildApp,gotox,gotox,dvbapi dvbsec,,))
98$(eval $(call DvbBuildApp,scan,scan,,,$(ICONV_DEPENDS)))
99$(eval $(call DvbBuildApp,szap,szap,,,))
100$(eval $(call DvbBuildApp,tzap,tzap,,,))
101$(eval $(call DvbBuildApp,zap,zap,dvbcfg dvben50221 dvbsec dvbapi ucsi,,libpthread))
102
103
104# 1: short name
105# 2: description
106# 3: dependencies on other Linux DVB API libraries (short name)
107# 4: dependencies on other packages
108define DvbBuildLibrary
109
110  DVBA_DEPENDS += +lib$(1)
111
112  define Package/lib$(1)
113    $(call Package/dvb-apps/Default)
114    TITLE+= $(2) library
115    DEPENDS+= $$(foreach p,$(3),+lib$$(p)) $(4)
116  endef
117
118  define Package/lib$(1)/description
119   $(call Package/dvb-apps/description/Default)
120   .
121   This package contains the Linux DVB $(2) library.
122  endef
123
124  define Package/lib$(1)/install
125        $(INSTALL_DIR) $$(1)/usr/lib
126        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib$(1).so* \
127                $$(1)/usr/lib
128  endef
129
130  $$(eval $$(call BuildPackage,lib$(1)))
131endef
132
133$(eval $(call DvbBuildLibrary,dvbapi,dvbapi,,))
134$(eval $(call DvbBuildLibrary,dvbcfg,dvbcfg,,))
135$(eval $(call DvbBuildLibrary,dvben50221,dvben50221,,))
136$(eval $(call DvbBuildLibrary,dvbsec,dvbsec,,))
137$(eval $(call DvbBuildLibrary,esg,esg,,))
138$(eval $(call DvbBuildLibrary,ucsi,ucsi,,))
139
140
141# 1: short name
142# 2: description
143# 3: dependencies on other packages
144define DvbBuildTuningData
145
146  DVBA_DEPENDS += +dvb-tuning-$(1)
147
148  define Package/dvb-tuning-$(1)
149    $(call Package/dvb-apps/Default)
150    TITLE+= $(2) initial tuning data
151    DEPENDS+= $(3)
152  endef
153
154  define Package/dvb-tuning-$(1)/description
155   $(call Package/dvb-apps/description/Default)
156   .
157   This package contains the Linux DVB initial tuning data for $(2).
158  endef
159
160  define Package/dvb-tuning-$(1)/install
161        $(INSTALL_DIR) $$(1)/usr/share/dvb/$(1)
162        $(CP) $(PKG_INSTALL_DIR)/usr/share/dvb/$(1)/* \
163                $$(1)/usr/share/dvb/$(1)
164  endef
165
166  $$(eval $$(call BuildPackage,dvb-tuning-$(1)))
167endef
168
169$(eval $(call DvbBuildTuningData,atsc,ATSC,))
170$(eval $(call DvbBuildTuningData,dvb-c,DVB-C,))
171$(eval $(call DvbBuildTuningData,dvb-s,DVB-S,))
172$(eval $(call DvbBuildTuningData,dvb-t,DVB-T,))
173
174
175DVBA_DEPENDS += +dvb-keymaps-av7110
176
177define Package/dvb-keymaps-av7110
178  $(call Package/dvb-apps/Default)
179  TITLE+= av7110 keymaps
180endef
181
182define Package/dvb-keymaps-av7110/description
183  $(call Package/dvb-apps/description/Default)
184  .
185  This package contains keymaps for the av7110_loadkeys application.
186endef
187
188define Package/dvb-keymaps-av7110/install
189        $(INSTALL_DIR) $(1)/usr/share/dvb/av7110_loadkeys
190        $(CP) $(PKG_INSTALL_DIR)/usr/share/dvb/av7110_loadkeys/* \
191                $(1)/usr/share/dvb/av7110_loadkeys
192endef
193
194$(eval $(call BuildPackage,dvb-keymaps-av7110))
195
196$(eval $(call BuildPackage,dvb-apps))