1 | # $Id: Portfile 39440 2008-08-20 00:43:24Z ricci@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name nut |
---|
6 | |
---|
7 | set majorVer 2 |
---|
8 | set minorVer 2 |
---|
9 | set majorMinorVer ${majorVer}.${minorVer} |
---|
10 | set revVer 2 |
---|
11 | version ${majorVer}.${minorVer}.${revVer} |
---|
12 | revision 0 |
---|
13 | categories sysutils |
---|
14 | maintainers ricci |
---|
15 | description Network based UPS monitoring tool |
---|
16 | homepage http://www.networkupstools.org/ |
---|
17 | platforms darwin |
---|
18 | |
---|
19 | long_description Network UPS Tools is a collection of programs \ |
---|
20 | which provide a common interface for monitoring \ |
---|
21 | and administering UPS hardware. |
---|
22 | |
---|
23 | master_sites http://www.networkupstools.org/source/${majorMinorVer} |
---|
24 | |
---|
25 | checksums md5 677a84a83e9be7bc93610413ee696375 \ |
---|
26 | sha1 f54cc909b229931fb91b4a360f0447b539d4ea6b \ |
---|
27 | rmd160 4dc1d2b729fc0e02c0475008c44bc62e1901f705 |
---|
28 | |
---|
29 | depends_lib port:libusb |
---|
30 | |
---|
31 | set userName _nut |
---|
32 | set groupName _nut |
---|
33 | set stateDir ${prefix}/var/db/ups |
---|
34 | destroot.keepdirs ${destroot}${stateDir} |
---|
35 | |
---|
36 | configure.args \ |
---|
37 | --with-serial=no \ |
---|
38 | --with-usb=auto \ |
---|
39 | --with-snmp=no \ |
---|
40 | --with-hal=auto \ |
---|
41 | --with-cgi=no \ |
---|
42 | --with-neonxml=no \ |
---|
43 | --with-ssl=yes \ |
---|
44 | --with-ipv6=no \ |
---|
45 | --with-statepath=${stateDir} \ |
---|
46 | --with-pidpath=${prefix}/var/run \ |
---|
47 | --with-hotplug-dir=${prefix}/etc/nut/hotplug \ |
---|
48 | --with-udev-dir=${prefix}/etc/nut/udev \ |
---|
49 | --with-user=${userName} \ |
---|
50 | --with-group=${groupName} |
---|
51 | |
---|
52 | |
---|
53 | pre-destroot { |
---|
54 | addgroup ${groupName} |
---|
55 | set gid [existsgroup ${groupName}] |
---|
56 | adduser ${userName} gid=${gid} |
---|
57 | xinstall -d -m 0770 -g ${groupName} -o ${userName} ${destroot}${stateDir} |
---|
58 | } |
---|
59 | |
---|
60 | ## variant snmp { |
---|
61 | ## configure.args-append --with-snmp=yes |
---|
62 | ## configure.args-delete --with-snmp=no |
---|
63 | ## depends_lib-append port:net-snmp |
---|
64 | ## } |
---|
65 | |
---|
66 | # |
---|
67 | ##EOF |
---|