Procházet zdrojové kódy

utils/rtl-sdr: Import from packages

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
Vasilis Tsiligiannis před 10 roky
rodič
revize
441e86361d
1 změnil soubory, kde provedl 88 přidání a 0 odebrání
  1. 88
    0
      utils/rtl-sdr/Makefile

+ 88
- 0
utils/rtl-sdr/Makefile Zobrazit soubor

@@ -0,0 +1,88 @@
1
+#
2
+# Copyright (C) 2013 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+
7
+include $(TOPDIR)/rules.mk
8
+
9
+PKG_NAME:=rtl-sdr
10
+PKG_VERSION:=2013-06-12
11
+PKG_RELEASE:=$(PKG_SOURCE_VERSION)
12
+
13
+PKG_SOURCE_PROTO:=git
14
+PKG_SOURCE_URL:=git://git.osmocom.org/rtl-sdr.git
15
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
16
+PKG_SOURCE_VERSION:=8c3a99c8f7a88d7d2a05845d4b20cfcdacac4054
17
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
18
+CMAKE_INSTALL:=1
19
+
20
+PKG_LICENSE:=GPLv2
21
+PKG_LICENSE_FILES:=COPYING
22
+
23
+PKG_MAINTAINER:=Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+include $(INCLUDE_DIR)/cmake.mk
27
+
28
+define Package/rtl-sdr/Default
29
+  TITLE:=Software Defined Radio with Realtek RTL2832U
30
+  URL:=http://sdr.osmocom.org/trac/wiki/rtl-sdr
31
+endef
32
+
33
+define Package/rtl-sdr/Default/description
34
+  rtl-sdr allows DVB-T dongles based on the Realtek RTL2832U to be used as
35
+  an inexpensive SDR.
36
+endef
37
+
38
+define Package/rtl-sdr
39
+  $(call Package/rtl-sdr/Default)
40
+  SECTION:=utils
41
+  CATEGORY:=Utilities
42
+  DEPENDS:=+librt +libpthread +librtlsdr
43
+endef
44
+
45
+define Package/rtl-sdr/description
46
+  $(call Package/rtl-sdr/Default/description)
47
+
48
+  This package contains the utilities and daemons.
49
+endef
50
+
51
+define Package/librtlsdr
52
+  $(call Package/rtl-sdr/Default)
53
+  TITLE+= shared library
54
+  SECTION:=libs
55
+  CATEGORY:=Libraries
56
+  TITLE+= library
57
+  DEPENDS:=+libusb-1.0
58
+endef
59
+
60
+define Package/librtlsdr/description
61
+  $(call Package/rtl-sdr/Default/description)
62
+
63
+  This package contains the librtlsdr shared library.
64
+endef
65
+
66
+TARGET_CFLAGS += $(FPIC)
67
+
68
+define Build/InstallDev
69
+	$(INSTALL_DIR) $(1)/usr/include
70
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
71
+	$(INSTALL_DIR) $(1)/usr/lib
72
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/librtlsdr.so* $(1)/usr/lib/
73
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
74
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librtlsdr.pc $(1)/usr/lib/pkgconfig/
75
+endef
76
+
77
+define Package/rtl-sdr/install
78
+	$(INSTALL_DIR) $(1)/usr/bin
79
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/rtl_* $(1)/usr/bin/
80
+endef
81
+
82
+define Package/librtlsdr/install
83
+	$(INSTALL_DIR) $(1)/usr/lib
84
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/librtlsdr.so* $(1)/usr/lib/
85
+endef
86
+
87
+$(eval $(call BuildPackage,rtl-sdr))
88
+$(eval $(call BuildPackage,librtlsdr))