cloudflared: Fix incorrect uci config syntax
[feed/packages.git] / libs / libextractor / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=libextractor
9 PKG_VERSION:=1.13
10 PKG_RELEASE:=1
11
12 # ToDo:
13 # - package missing optional dependencies: libexiv2, gsf, librpm, smf, tidy
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
17 PKG_HASH:=bb8f312c51d202572243f113c6b62d8210301ab30cbaee604f9837d878cdf755
18
19 PKG_LICENSE:=GPL-3.0-or-later
20 PKG_LICENSE_FILES:=COPYING
21 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25 PKG_BUILD_PARALLEL:=1
26 PKG_CONFIG_DEPENDS:= \
27 CONFIG_PACKAGE_libextractor-plugin-gstreamer
28
29 PLUGINS:= \
30 archive:+libarchive-noopenssl \
31 deb \
32 dvi \
33 flac:+libflac \
34 gif:+giflib \
35 gstreamer:+libgstreamer1:+gstreamer1-plugins-base:+libgst1app:+libgst1pbutils:+libgst1tag \
36 it \
37 jpeg:+libjpeg-turbo \
38 man \
39 mime:+libmagic \
40 mpeg:+libmpeg2 \
41 nsf \
42 nsfe \
43 odf \
44 ogg:+libvorbis \
45 png \
46 ps \
47 riff \
48 s3m \
49 sid \
50 tiff:+libtiff \
51 wav \
52 xm \
53 zip
54
55
56 include $(INCLUDE_DIR)/package.mk
57 include $(INCLUDE_DIR)/nls.mk
58
59 CONFIGURE_ARGS += \
60 --disable-glibtest \
61 --disable-gsf \
62 --disable-rpath \
63 --with$(if $(CONFIG_PACKAGE_libextractor-plugin-gstreamer),,out)-gstreamer
64
65 define Package/libextractor
66 SECTION:=libs
67 CATEGORY:=Libraries
68 TITLE:=GNU Libextractor
69 URL:=https://www.gnu.org/software/libextractor/
70 DEPENDS:=+libbz2 +libltdl +librt +zlib $(ICONV_DEPENDS) $(INTL_DEPENDS)
71 MENU:=1
72 endef
73
74 define Package/libextractor/description
75 GNU Libextractor is a library used to extract meta data from files.
76 The goal is to provide developers of file-sharing networks, browsers or
77 WWW-indexing bots with a universal library to obtain simple keywords and meta
78 data to match against queries and to show to users instead of only relying on
79 filenames.
80 endef
81
82 define PluginGen
83 define Package/libextractor-plugin-$(subst _,-,$(firstword $(subst :, ,$(1))))
84 SECTION:=libs
85 CATEGORY:=Libraries
86 TITLE:=GNU Libextractor ($(firstword $(subst :, ,$(1))) plugin)
87 URL:=https://www.gnu.org/software/libextractor/
88 DEPENDS:=libextractor $(wordlist 2,$(words $(subst :, ,$(1))),$(subst :, ,$(1)))
89 endef
90 endef
91
92 $(foreach file,$(PLUGINS),$(eval $(call PluginGen,$(file))))
93
94 define Package/extract
95 SECTION:=utils
96 CATEGORY:=Utilities
97 TITLE:=extract util from GNU Libextractor
98 URL:=https://www.gnu.org/software/libextractor/
99 DEPENDS:=+libextractor
100 endef
101
102 define Package/extract/description
103 libextractor contains the shell command extract that, similar to the
104 well-known file command, can extract meta data from a file an print the results
105 to stdout.
106 endef
107
108 define Build/InstallDev
109 $(INSTALL_DIR) $(1)/usr/include/
110 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
111 $(INSTALL_DIR) $(1)/usr/lib/
112 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
113 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
114 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
115 endef
116
117 define Package/libextractor/install
118 $(INSTALL_DIR) $(1)/usr/lib/
119 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
120 endef
121
122 define PluginInstall
123 define Package/libextractor-plugin-$(subst _,-,$(firstword $(subst :, ,$(1))))/install
124 $(INSTALL_DIR) $$(1)/usr/lib/libextractor
125 $(INSTALL_BIN) \
126 $(PKG_INSTALL_DIR)/usr/lib/libextractor/libextractor_$(firstword $(subst :, ,$(1))).so \
127 $$(1)/usr/lib/libextractor
128 endef
129 endef
130
131 define Package/extract/install
132 $(INSTALL_DIR) $(1)/usr/bin
133 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
134 endef
135
136 $(foreach file,$(PLUGINS),$(eval $(call PluginInstall,$(file))))
137
138 $(eval $(call BuildPackage,libextractor))
139 $(foreach file,$(PLUGINS),$(eval $(call BuildPackage,libextractor-plugin-$(subst _,-,$(firstword $(subst :, ,$(file)))))))
140 $(eval $(call BuildPackage,extract))