treewide: run "make check FIXUP=1"
[feed/packages.git] / libs / libsoc / Makefile
1 #
2 # Copyright (C) 2017 Yegor Yefremov <yegorslists@googlemail.com>
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libsoc
11 PKG_RELEASE:=1
12
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_URL:=https://github.com/jackmitch/libsoc.git
15 PKG_SOURCE_DATE:=2016-12-22
16 PKG_SOURCE_VERSION:=5b788d4d558a78c52e6cfe97325e4564b307a3a0
17
18 PKG_MAINTAINER:=Yegor Yefremov <yegorslists@googlemail.com>
19 PKG_LICENSE:=LGPL-2.1
20 PKG_LICENSE_FILES:=LICENCE
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libsoc
29 SECTION:=libs
30 CATEGORY:=Libraries
31 DEPENDS:=+libpthread
32 TITLE:=SoC Library
33 URL:=https://github.com/jackmitch/libsoc
34 endef
35
36 define Package/libsoc/description
37 libsoc: C library for interfacing with common SoC peripherals through
38 generic kernel interfaces
39 endef
40
41 CONFIGURE_ARGS += \
42 --enable-shared \
43 --enable-static \
44 --disable-cxx
45
46 MAKE_FLAGS += \
47 CFLAGS="$(TARGET_CFLAGS)" \
48 DESTDIR="$(PKG_INSTALL_DIR)" \
49 all install
50
51 define Build/InstallDev
52 $(INSTALL_DIR) $(1)/usr/include
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_board.h $(1)/usr/include/
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_conffile.h $(1)/usr/include/
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_debug.h $(1)/usr/include/
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_gpio.h $(1)/usr/include/
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_i2c.h $(1)/usr/include/
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_pwm.h $(1)/usr/include/
59 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_spi.h $(1)/usr/include/
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoc.{a,so*} $(1)/usr/lib/
62 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsoc.pc $(1)/usr/lib/pkgconfig
64 endef
65
66 define Package/libsoc/install
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoc.so.* $(1)/usr/lib/
69 endef
70
71 $(eval $(call BuildPackage,libsoc))