1 include $(TOPDIR
)/rules.mk
7 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
8 PKG_SOURCE_URL
:=https
://codeload.github.com
/openSUSE
/hwinfo
/tar.gz
/$(PKG_VERSION
)?
9 PKG_HASH
:=bc3c4a4498e4abc32a54497ced715bbae5dfd19dd999da294bca6d69fea2db52
11 PKG_LICENSE
:=GPL-2.0
-or-later
12 PKG_MAINTAINER
:=Alberto Bursi
<bobafetthotmail@gmail.com
>
14 PKG_BUILD_DEPENDS
:= hwinfo
/host
16 include $(INCLUDE_DIR
)/package.mk
17 include $(INCLUDE_DIR
)/host-build.mk
19 # Execute in host build directory
20 HOST_MAKE_FLAGS
+= -C
$(HOST_BUILD_DIR
)
23 # copy uuid.h to another location in host build dir as that's where this package expects it
24 $(INSTALL_DIR
) $(STAGING_DIR_HOST
)/include/uuid
/
25 $(CP
) $(STAGING_DIR_HOST
)/include/e2fsprogs
/uuid
/uuid.h
$(STAGING_DIR_HOST
)/include/uuid
/uuid.h
29 # Build using host compiler and let it generate the files we need
30 # CFLAGS, CPPFLAGS & LDFLAGS need to be passed with CC because they are being ingored
31 CC
="$(HOSTCC) $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(HOST_LDFLAGS)" $(MAKE
) $(HOST_MAKE_FLAGS
)
35 $(INSTALL_DIR
) $(STAGING_DIR_HOST
)/share
/hwinfo
36 $(CP
) $(HOST_BUILD_DIR
)/src
/isdn
/cdb
/isdn_cdb
$(STAGING_DIR_HOST
)/share
/hwinfo
/
37 $(CP
) $(HOST_BUILD_DIR
)/src
/isdn
/cdb
/mk_isdnhwdb
$(STAGING_DIR_HOST
)/share
/hwinfo
/
39 $(CP
) $(HOST_BUILD_DIR
)/src
/ids
/check_hd
$(STAGING_DIR_HOST
)/share
/hwinfo
/
42 define Build
/Configure
43 # Fetch prebuilt files from host build dir
44 $(INSTALL_DIR
) $(PKG_BUILD_DIR
)/src
/isdn
/cdb
/
45 $(CP
) $(STAGING_DIR_HOST
)/share
/hwinfo
/isdn_cdb
$(PKG_BUILD_DIR
)/src
/isdn
/cdb
/
46 $(CP
) $(STAGING_DIR_HOST
)/share
/hwinfo
/mk_isdnhwdb
$(PKG_BUILD_DIR
)/src
/isdn
/cdb
/
48 $(INSTALL_DIR
) $(PKG_BUILD_DIR
)/src
/ids
/
49 $(CP
) $(STAGING_DIR_HOST
)/share
/hwinfo
/check_hd
$(PKG_BUILD_DIR
)/src
/ids
/
52 # Set copied files modtime to one day in the future
53 # to prevent rebuilding them
54 perl
-e
'utime(time() + 86400, time() + 86400, $$$$ARGV[0])' \
55 $(PKG_BUILD_DIR
)/src
/isdn
/cdb
/isdn_cdb
56 perl
-e
'utime(time() + 86400, time() + 86400, $$$$ARGV[0])' \
57 $(PKG_BUILD_DIR
)/src
/isdn
/cdb
/mk_isdnhwdb
58 perl
-e
'utime(time() + 86400, time() + 86400, $$$$ARGV[0])' \
59 $(PKG_BUILD_DIR
)/src
/ids
/check_hd
66 TITLE
:=probe the hardware present in the system
67 URL
:=https
://github.com
/openSUSE
/hwinfo
68 DEPENDS
:= +libuuid @
!USE_UCLIBC
71 define Package
/hwinfo
/description
72 hwinfo
/libhd are used to probe for the hardware present in the system.
73 It can be used to generate a system overview log which can be later
75 This project provides a hardware probing library libhd.so and a
76 command line tool hwinfo using it. A major project using this library
77 is YaST
, the SUSE installation tool.
81 define Package
/hwinfo
/install
82 $(INSTALL_DIR
) $(1)/usr
/bin
83 $(CP
) $(PKG_BUILD_DIR
)/hwinfo
$(1)/usr
/bin
/
84 $(INSTALL_DIR
) $(1)/usr
/lib
85 $(CP
) $(PKG_BUILD_DIR
)/src
/libhd.so
* $(1)/usr
/lib
/
88 $(eval
$(call BuildPackage
,hwinfo
))
89 $(eval
$(call HostBuild
))