commit e2994cfd93d96b14393470352adaa907357a5a92
parent 78210c2255875d3b8a883fd500b16872ac8a7509
Author: sbyx <steven@midlink.org>
Date: Sun, 16 Nov 2014 11:41:34 +0100
Merge pull request #547 from rkunze/hdparm
hdparm: import from oldpackages
Diffstat:
2 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/utils/hdparm/Makefile b/utils/hdparm/Makefile
@@ -0,0 +1,41 @@
+#
+# Copyright (C) 2006-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hdparm
+PKG_VERSION:=9.45
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
+PKG_MD5SUM:=1c75d0751a44928b6c4bc81fb16d7fe8
+PKG_MAINTAINER:=Richard Kunze <richard.kunze@web.de>
+PKG_LICENSE:=BSD-Style Open Source License
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS+=-D_GNU_SOURCE
+
+define Package/hdparm
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=disc
+ TITLE:=Hard disk drive configuration utilitity
+ URL:=http://sourceforge.net/projects/hdparm/
+endef
+
+define Package/hdparm/description
+ get/set SATA/IDE device parameters
+endef
+
+define Package/hdparm/install
+ $(INSTALL_DIR) $(1)/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/sbin
+endef
+
+$(eval $(call BuildPackage,hdparm))
diff --git a/utils/hdparm/patches/001-fix-includes.patch b/utils/hdparm/patches/001-fix-includes.patch
@@ -0,0 +1,20 @@
+--- a/hdparm.h
++++ b/hdparm.h
+@@ -2,6 +2,7 @@
+
+ //#undef __KERNEL_STRICT_NAMES
+ #include <linux/types.h>
++#include <sys/types.h>
+
+ #if !defined(__GNUC__) && !defined(__attribute__)
+ #define __attribute__(x)
+--- a/sysfs.c
++++ b/sysfs.c
+@@ -12,6 +12,7 @@
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <limits.h>
+ #include <dirent.h>
+ #include <sys/stat.h>
+ #include <linux/types.h>