Przeglądaj źródła

Merge pull request #547 from rkunze/hdparm

hdparm: import from oldpackages
sbyx 10 lat temu
rodzic
commit
e2994cfd93
2 zmienionych plików z 61 dodań i 0 usunięć
  1. 41
    0
      utils/hdparm/Makefile
  2. 20
    0
      utils/hdparm/patches/001-fix-includes.patch

+ 41
- 0
utils/hdparm/Makefile Wyświetl plik

@@ -0,0 +1,41 @@
1
+#
2
+# Copyright (C) 2006-2014 OpenWrt.org
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:=hdparm
11
+PKG_VERSION:=9.45
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
16
+PKG_MD5SUM:=1c75d0751a44928b6c4bc81fb16d7fe8
17
+PKG_MAINTAINER:=Richard Kunze <richard.kunze@web.de>
18
+PKG_LICENSE:=BSD-Style Open Source License
19
+
20
+include $(INCLUDE_DIR)/package.mk
21
+
22
+TARGET_CFLAGS+=-D_GNU_SOURCE
23
+
24
+define Package/hdparm
25
+  SECTION:=utils
26
+  CATEGORY:=Utilities
27
+  SUBMENU:=disc
28
+  TITLE:=Hard disk drive configuration utilitity
29
+  URL:=http://sourceforge.net/projects/hdparm/
30
+endef
31
+
32
+define Package/hdparm/description
33
+ get/set SATA/IDE device parameters
34
+endef
35
+
36
+define Package/hdparm/install
37
+	$(INSTALL_DIR) $(1)/sbin
38
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/sbin
39
+endef
40
+
41
+$(eval $(call BuildPackage,hdparm))

+ 20
- 0
utils/hdparm/patches/001-fix-includes.patch Wyświetl plik

@@ -0,0 +1,20 @@
1
+--- a/hdparm.h
2
++++ b/hdparm.h
3
+@@ -2,6 +2,7 @@
4
+ 
5
+ //#undef __KERNEL_STRICT_NAMES
6
+ #include <linux/types.h>
7
++#include <sys/types.h>
8
+ 
9
+ #if !defined(__GNUC__) && !defined(__attribute__)
10
+ #define __attribute__(x)
11
+--- a/sysfs.c
12
++++ b/sysfs.c
13
+@@ -12,6 +12,7 @@
14
+ #include <stdio.h>
15
+ #include <fcntl.h>
16
+ #include <errno.h>
17
++#include <limits.h>
18
+ #include <dirent.h>
19
+ #include <sys/stat.h>
20
+ #include <linux/types.h>