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
:=c4c573eb15cbc10103f5044b485d7e4ff941500ed559743a1c98e6a6deb0ebda
11 PKG_LICENSE
:=GPL-2.0
-or-later
12 PKG_LICENSE_FILES
:=COPYING
13 PKG_MAINTAINER
:=Alberto Bursi
<bobafetthotmail@gmail.com
>
15 PKG_BUILD_DEPENDS
:= hwinfo
/host
17 include $(INCLUDE_DIR
)/package.mk
18 include $(INCLUDE_DIR
)/host-build.mk
21 # copy uuid.h to another location in host build dir as that's where this package expects it
22 $(INSTALL_DIR
) $(STAGING_DIR_HOST
)/include/uuid
/
23 $(CP
) $(STAGING_DIR_HOST
)/include/e2fsprogs
/uuid
/uuid.h
$(STAGING_DIR_HOST
)/include/uuid
/uuid.h
27 # Build using host compiler and let it generate the files we need
28 # CFLAGS, CPPFLAGS & LDFLAGS need to be passed with CC because they are being ingored
29 CC
="$(HOSTCC) $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(HOST_LDFLAGS)" $(MAKE
) \
30 -C
$(HOST_BUILD_DIR
)/src
/isdn
/cdb
31 CC
="$(HOSTCC) $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(HOST_LDFLAGS)" $(MAKE
) \
32 -C
$(HOST_BUILD_DIR
)/src
/ids
36 $(INSTALL_DIR
) $(STAGING_DIR_HOST
)/share
/hwinfo
37 $(CP
) $(HOST_BUILD_DIR
)/src
/isdn
/cdb
/isdn_cdb
$(STAGING_DIR_HOST
)/share
/hwinfo
/
38 $(CP
) $(HOST_BUILD_DIR
)/src
/isdn
/cdb
/mk_isdnhwdb
$(STAGING_DIR_HOST
)/share
/hwinfo
/
40 $(CP
) $(HOST_BUILD_DIR
)/src
/ids
/check_hd
$(STAGING_DIR_HOST
)/share
/hwinfo
/
43 define Build
/Configure
44 # Fetch prebuilt files from host build dir
45 $(INSTALL_DIR
) $(PKG_BUILD_DIR
)/src
/isdn
/cdb
/
46 $(CP
) $(STAGING_DIR_HOST
)/share
/hwinfo
/isdn_cdb
$(PKG_BUILD_DIR
)/src
/isdn
/cdb
/
47 $(CP
) $(STAGING_DIR_HOST
)/share
/hwinfo
/mk_isdnhwdb
$(PKG_BUILD_DIR
)/src
/isdn
/cdb
/
49 $(INSTALL_DIR
) $(PKG_BUILD_DIR
)/src
/ids
/
50 $(CP
) $(STAGING_DIR_HOST
)/share
/hwinfo
/check_hd
$(PKG_BUILD_DIR
)/src
/ids
/
53 # Set copied files modtime to one day in the future
54 # to prevent rebuilding them
55 perl
-e
'utime(time() + 86400, time() + 86400, $$$$ARGV[0])' \
56 $(PKG_BUILD_DIR
)/src
/isdn
/cdb
/isdn_cdb
57 perl
-e
'utime(time() + 86400, time() + 86400, $$$$ARGV[0])' \
58 $(PKG_BUILD_DIR
)/src
/isdn
/cdb
/mk_isdnhwdb
59 perl
-e
'utime(time() + 86400, time() + 86400, $$$$ARGV[0])' \
60 $(PKG_BUILD_DIR
)/src
/ids
/check_hd
67 TITLE
:=probe the hardware present in the system
68 URL
:=https
://github.com
/openSUSE
/hwinfo
72 define Package
/hwinfo
/description
73 hwinfo
/libhd are used to probe for the hardware present in the system.
74 It can be used to generate a system overview log which can be later
76 This project provides a hardware probing library libhd.so and a
77 command line tool hwinfo using it. A major project using this library
78 is YaST
, the SUSE installation tool.
82 define Package
/hwinfo
/install
83 $(INSTALL_DIR
) $(1)/usr
/bin
84 $(CP
) $(PKG_BUILD_DIR
)/hwinfo
$(1)/usr
/bin
/
85 $(INSTALL_DIR
) $(1)/usr
/lib
86 $(CP
) $(PKG_BUILD_DIR
)/src
/libhd.so
* $(1)/usr
/lib
/
89 $(eval
$(call BuildPackage
,hwinfo
))
90 $(eval
$(call HostBuild
))