diff --git a/smartmontools/build.sh b/smartmontools/build.sh new file mode 100755 index 0000000..20c5dcf --- /dev/null +++ b/smartmontools/build.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# This is a buildpkg build.sh script +# build.sh helper functions +. ${BUILDPKG_SCRIPTS}/build.sh.functions +# +########################################################### +# Check the following 4 variables before running the script +topdir=smartmontools +version=6.4 +pkgver=1 +source[0]=http://downloads.sourceforge.net/$topdir/$topdir-$version.tar.gz +# If there are no patches, simply comment this +patch[0]=smartmontools-6.4-cxx-fix.patch + +# Source function library +. ${BUILDPKG_SCRIPTS}/buildpkg.functions + +# Global settings +export CPPFLAGS="-I$prefix/include" +export LDFLAGS="-L$prefix/lib -R$prefix/lib" +ac_overrides="ac_cv_func_regcomp=no" +configure_args+=(--docdir=$prefix/$_vdocdir --with-initscriptdir=$prefix/$_vdocdir --with-working-snprintf=no) + +reg prep +prep() +{ + generic_prep + setdir source +} + +reg build +build() +{ + generic_build +} + +reg check +check() +{ + generic_check +} + +reg install +install() +{ + generic_install DESTDIR + ${__mv} ${stagedir}${prefix}/${_vdocdir}/smartd ${stagedir}${prefix}/${_vdocdir}/smartd.init + ${__rm} -f ${stagedir}${prefix}/${_sysconfdir}/smartd.conf +} + +reg pack +pack() +{ + generic_pack +} + +reg distclean +distclean() +{ + clean distclean +} + +################################################### +# No need to look below here +################################################### +build_sh $* diff --git a/smartmontools/meta/ChangeLog b/smartmontools/meta/ChangeLog new file mode 100644 index 0000000..e066c6f --- /dev/null +++ b/smartmontools/meta/ChangeLog @@ -0,0 +1,6 @@ +CHANGELOG +--------- +* Fri Feb 19 2016 Tom G. Christensen - 6.4-1 +- First package +- Initial work done by Romain Dolbeau +- diff --git a/smartmontools/meta/pkgdef b/smartmontools/meta/pkgdef new file mode 100644 index 0000000..7b5b889 --- /dev/null +++ b/smartmontools/meta/pkgdef @@ -0,0 +1,20 @@ +[smartmontools] +pkgname="${pkgprefix}smont" +name="$topdir - tools for monitoring SMART capable hard disks" +pkgcat="application" +pkgvendor="https://www.smartmontools.org/" +pkgdesc="Control and monitor storage systems using the SMART System" +pkgver="$pkgver" +files(-,root,bin) +default_docs +$_sysconfdir/smartd_warning.sh +dir $_sysconfdir/smartd_warning.d +$_sbindir/smartctl +$_sbindir/smartd +$_sbindir/update-smart-drivedb +$_sharedir/$topdir/drivedb.h +$_mandir/man1m/smartctl.* +$_mandir/man1m/smartd.* +$_mandir/man1m/update-smart-drivedb.* +$_mandir/man4/smartd.conf.* + diff --git a/smartmontools/src/smartmontools-6.4-cxx-fix.patch b/smartmontools/src/smartmontools-6.4-cxx-fix.patch new file mode 100644 index 0000000..361a548 --- /dev/null +++ b/smartmontools/src/smartmontools-6.4-cxx-fix.patch @@ -0,0 +1,11 @@ +--- smartmontools-6.4/regex/regex.h.cplus 2012-12-13 18:23:06.000000000 +0100 ++++ smartmontools-6.4/regex/regex.h 2016-02-19 22:42:53.390013000 +0100 +@@ -536,7 +536,7 @@ + #endif + /* gcc 3.1 and up support the [restrict] syntax. */ + #ifndef __restrict_arr +-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) && !defined(__WIN32__) ++# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) && !defined(__WIN32__) && !defined(__cplusplus) + # define __restrict_arr __restrict + # else + # define __restrict_arr