lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (3735B)


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