Mercurial > vanilla
comparison system/smartmontools/smartmontools.sh @ 621:8776fbd72b2f
system/smartmontools: initial import, closes #1655
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 23 Jul 2019 21:05:00 +0200 |
parents | |
children | ddab65a5b3f5 |
comparison
equal
deleted
inserted
replaced
620:80faeb51a8f7 | 621:8776fbd72b2f |
---|---|
1 #!/bin/sh | |
2 # | |
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr> | |
4 # | |
5 # Permission to use, copy, modify, and/or distribute this software for any | |
6 # purpose with or without fee is hereby granted, provided that the above | |
7 # copyright notice and this permission notice appear in all copies. | |
8 # | |
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
16 # | |
17 | |
18 PKGNAME=smartmontools | |
19 PKGVERSION=7.0 | |
20 PKGREVISION=1 | |
21 PKGLICENSE="GPLv2+" | |
22 PKGSUMMARY="utilities to control and monitor SMART on hard drives" | |
23 PKGDOWNLOAD="https://downloads.sourceforge.net/sourceforge/$PKGNAME/$PKGNAME-$PKGVERSION.tar.gz" | |
24 PKGOPTIONS="SELINUX" | |
25 PKGPROTECT="etc/smartd.conf | |
26 etc/smartd_warning.sh" | |
27 | |
28 : ${CHOST:=$(uname -m)-linux-musl} | |
29 : ${CBUILD:=$(uname -m)-linux-musl} | |
30 : ${CC:=clang} | |
31 : ${CFLAGS:=-O2} | |
32 : ${CXX:=clang++} | |
33 : ${CXXFLAGS:=-O2} | |
34 : ${LDFLAGS:=} | |
35 : ${LIBS:=} | |
36 : ${SELINUX:=no} | |
37 | |
38 if [ "$SELINUX" = "yes" ]; then | |
39 with_selinux="--with-selinux" | |
40 else | |
41 with_selinux="--without-selinux" | |
42 fi | |
43 | |
44 build() | |
45 { | |
46 rm -rf $PKGNAME-$PKGVERSION | |
47 tar xvf $PKGNAME-$PKGVERSION.tar.gz | |
48 cd $PKGNAME-$PKGVERSION | |
49 | |
50 CC="$CC" \ | |
51 CFLAGS="$CFLAGS" \ | |
52 CXX="$CXX" \ | |
53 CXXFLAGS="$CXXFLAGS" \ | |
54 LDFLAGS="$LDFLAGS" \ | |
55 LIBS="$LIBS" \ | |
56 ./configure \ | |
57 --build=$CBUILD \ | |
58 --host=$CHOST \ | |
59 --prefix= \ | |
60 --sbindir=/bin \ | |
61 $with_selinux | |
62 make | |
63 make install DESTDIR=$DESTDIR | |
64 install -Dm0644 ../smartd $DESTDIR/etc/rc.d/smartd | |
65 | |
66 cd .. | |
67 rm -rf $PKGNAME-$PKGVERSION | |
68 } |