Initial recipe for NUT-2.7.4
[unleashed-userland.git] / components / sysutils / nut / nut-bins.p5m
blob319eba2d26779e35348be918ab36b6a8c1c5deb1
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
7 # A full copy of the text of the CDDL should have accompanied this
8 # source.  A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2016 Jim Klimov
16 set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)/bins@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
17 set name=pkg.summary value="$(COMPONENT_SUMMARY) - NUT Command-line binaries and scripts"
18 set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
19 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
20 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
21 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
23 license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
25 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
27 depend fmri=$(COMPONENT_FMRI)-common@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION) type=require
29 ### NUT Command-line binaries and scripts (daemons, clients)
31 ### Note: While nut-scanner can use snmp, neon/xml, ipmi and usb libs, it loads
32 ### them truly dynamically (if available) and skips otherwise. Installing the
33 ### NUT driver packages should pull their relevant libs by harder ELF reqs.
34 ### Reasonably, if you don't want those UPSes (got no drivers) why scan them? :)
36 file path=usr/bin/$(MACH64)/nut-scanner
37 file path=usr/bin/$(MACH64)/upsc
38 file path=usr/bin/$(MACH64)/upscmd
39 file path=usr/bin/$(MACH64)/upslog
40 file path=usr/bin/$(MACH64)/upsrw
42 file path=usr/bin/nut-scanner
43 file path=usr/bin/upsc
44 file path=usr/bin/upscmd
45 file path=usr/bin/upslog
46 file path=usr/bin/upsrw
48 file path=usr/sbin/$(MACH64)/upsd
49 file path=usr/sbin/$(MACH64)/upsdrvctl
50 file path=usr/sbin/$(MACH64)/upsmon
51 file path=usr/sbin/$(MACH64)/upssched
53 file path=usr/sbin/upsd
54 file path=usr/sbin/upsdrvctl
55 file path=usr/sbin/upsmon
56 file path=usr/sbin/upssched
58 # Example notification script for UPSMON
59 file files/notifyme path=$(NUTDRVDIR)/notifyme preserve=renamenew
61 # This is an example script for handling upssched
62 file path=usr/bin/upssched-cmd preserve=renamenew
64 # Init-scripts for NUT, not perfect - but better than nothing for a start
65 # Note that it is practically blocked by default `nut.conf` until changed
66 # by administrator. We might deliver another script in its place later on.
67 # NUT should start generally after networking (if SNMP or NetXML is used,
68 # or if this box is a client to remote upsd). Ending is trickier - could
69 # want it to issue killpower late in shutdown, but have network to be able
70 # to do so (for remote UPSes). This can be tuned in XML manifest by user.
71 file path=lib/svc/method/svc-nut owner=bin group=bin mode=555
72 file files/nut.xml path=var/svc/manifest/application/nut.xml \
73      restart_fmri=svc:/system/manifest-import:default
75 file path=usr/share/man/man5/hosts.conf.5
76 file path=usr/share/man/man5/nut.conf.5
77 file path=usr/share/man/man5/ups.conf.5
78 file path=usr/share/man/man5/upsd.conf.5
79 file path=usr/share/man/man5/upsd.users.5
80 file path=usr/share/man/man5/upsmon.conf.5
81 file path=usr/share/man/man5/upssched.conf.5
83 file path=usr/share/man/man8/nut-scanner.8
84 file path=usr/share/man/man8/upsc.8
85 file path=usr/share/man/man8/upscmd.8
86 file path=usr/share/man/man8/upsd.8
87 file path=usr/share/man/man8/upsdrvctl.8
88 file path=usr/share/man/man8/upslog.8
89 file path=usr/share/man/man8/upsmon.8
90 file path=usr/share/man/man8/upsrw.8
91 file path=usr/share/man/man8/upssched.8
93 # NUT starter examples are by convention across many distros delivered in /etc
94 # Default rights inspired by scripts/Solaris/postinstall.in
95 file $(NUTETCDIR)/nut.conf.sample path=$(NUTETCSAMPLEDIR)/nut.conf.sample \
96     group=$(NUTGROUP) owner=root mode=0440
97 file $(NUTETCDIR)/ups.conf.sample path=$(NUTETCSAMPLEDIR)/ups.conf.sample \
98     group=$(NUTGROUP) owner=root mode=0440
99 file $(NUTETCDIR)/upsd.conf.sample path=$(NUTETCSAMPLEDIR)/upsd.conf.sample \
100     group=$(NUTGROUP) owner=root mode=0440
101 file $(NUTETCDIR)/upsd.users.sample path=$(NUTETCSAMPLEDIR)/upsd.users.sample \
102     group=$(NUTGROUP) owner=root mode=0440
103 file $(NUTETCDIR)/upsmon.conf.sample path=$(NUTETCSAMPLEDIR)/upsmon.conf.sample \
104     group=$(NUTGROUP) owner=root mode=0440
105 file $(NUTETCDIR)/upssched.conf.sample path=$(NUTETCSAMPLEDIR)/upssched.conf.sample \
106     group=$(NUTGROUP) owner=root mode=0440
108 # We can actually deliver the sample configs as the ones to use,
109 # at worst they have no actual information inside and do nothing.
110 # Also, the daemons are disabled by default `nut.conf` contents
111 file $(NUTETCDIR)/nut.conf.sample path=$(NUTETCDIR)/nut.conf \
112     group=$(NUTGROUP) owner=root mode=0440 preserve=true
113 file $(NUTETCDIR)/ups.conf.sample path=$(NUTETCDIR)/ups.conf \
114     group=$(NUTGROUP) owner=root mode=0440 preserve=true
115 file $(NUTETCDIR)/upsd.conf.sample path=$(NUTETCDIR)/upsd.conf \
116     group=$(NUTGROUP) owner=root mode=0440 preserve=true
117 file $(NUTETCDIR)/upsd.users.sample path=$(NUTETCDIR)/upsd.users \
118     group=$(NUTGROUP) owner=root mode=0440 preserve=true
119 file $(NUTETCDIR)/upsmon.conf.sample path=$(NUTETCDIR)/upsmon.conf \
120     group=$(NUTGROUP) owner=root mode=0440 preserve=true
121 file $(NUTETCDIR)/upssched.conf.sample path=$(NUTETCDIR)/upssched.conf \
122     group=$(NUTGROUP) owner=root mode=0440 preserve=true
124 # Integration with dynamically added devices (USB mostly)
125 # TODO pedantic: split this off to depend on some USB/hotplug/udev package(s)?
126 file path=$(NUTHOTPLUGDIR)/usb/libhid.usermap preserve=renamenew
127 file path=$(NUTHOTPLUGDIR)/usb/libhidups preserve=renamenew
129 # README also suggests running `udevadm trigger --subsystem-match=usb_device`
130 # Maybe on another iteration this would help us fix up illumos definitions?
131 ###TODO:IPMI### file path=$(NUTUDEVDIR)/rules.d/52-nut-ipmipsu.rules preserve=renamenew
132 file path=$(NUTUDEVDIR)/rules.d/62-nut-usbups.rules preserve=renamenew
134 # Maybe on another iteration this would help us fix up illumos definitions?
135 file scripts/upower/95-upower-hid.rules path=$(NUTETCSAMPLEDIR)/95-upower-hid.rules.sample
137 # TODO pedantic: split this off to depend on avahi package?
138 # Also make sure which path that would go into for actual installation?
139 file path=$(NUT_AVAHI_SERVICE_SAMPLE)
141 # TODO pedantic: split this off to depend on logrotate package?
142 file scripts/logrotate/nutlogd path=etc/logrotate.d/nutlogd preserve=renamenew
144 # TODO pedantic: split this off to depend on bash package?
145 file scripts/misc/nut.bash_completion path=usr/share/bash-completion/completions/nut