1eb450c
Name:         apcupsd
7e973bc
Version:      3.14.14
7e973bc
Release:      1%{?dist}
1eb450c
Summary:      APC UPS Power Control Daemon for Linux
1eb450c
1eb450c
Group:        System Environment/Daemons
e8cf9f4
License:      GPLv2
1eb450c
URL:          http://www.apcupsd.com
50b4058
Source0:      http://downloads.sourceforge.net/apcupsd/%{name}-%{version}.tar.gz
390086c
Source1:      apcupsd.logrotate
390086c
Source2:      apcupsd-httpd.conf
0210417
Source3:      apcupsd64x64.png
f85a07e
Patch0:       apcupsd-3.14.3-init.patch
f85a07e
Patch1:       apcupsd-3.14.4-shutdown.patch
61d2804
4105a1e
# systemd support
4105a1e
Patch3:       apcupsd-3.14.8-systemd.patch
4105a1e
7b66028
# fix crash in gui, rhbz#578276
7b66028
Patch4:       apcupsd-3.14.9-fixgui.patch
7b66028
1eb450c
BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1eb450c
d813a03
BuildRequires: glibc-devel >= 2.3, gd-devel > 2.0
0210417
BuildRequires: net-snmp-devel, tcp_wrappers-devel, libusb-devel
0047aee
BuildRequires: gtk2-devel, gnome-vfs2-devel, desktop-file-utils
1eb450c
Requires:      /bin/mail
461ea25
Requires(post): systemd-units
461ea25
Requires(preun): systemd-units
461ea25
Requires(postun): systemd-units
1eb450c
1eb450c
%description
1eb450c
Apcupsd can be used for controlling most APC UPSes. During a
1eb450c
power failure, apcupsd will inform the users about the power
1eb450c
failure and that a shutdown may occur.  If power is not restored,
1eb450c
a system shutdown will follow when the battery is exausted, a
1eb450c
timeout (seconds) expires, or the battery runtime expires based
1eb450c
on internal APC calculations determined by power consumption
1eb450c
rates.  If the power is restored before one of the above shutdown
1eb450c
conditions is met, apcupsd will inform users about this fact.
1eb450c
Some features depend on what UPS model you have (simple or smart).
1eb450c
1eb450c
1eb450c
%package cgi
1eb450c
Summary:      Web interface for apcupsd
1eb450c
Group:        Applications/Internet
1eb450c
Requires:     %{name} = %{version}-%{release}
1eb450c
Requires:     httpd
1eb450c
1eb450c
%description cgi
1eb450c
A CGI interface to the APC UPS monitoring daemon.
1eb450c
1eb450c
bb7a609
%package gui
bb7a609
Summary:      GUI interface for apcupsd
bb7a609
Group:        Applications/System
bb7a609
Requires:     %{name} = %{version}-%{release}
bb7a609
bb7a609
%description gui
bb7a609
A GUI interface to the APC UPS monitoring daemon.
bb7a609
bb7a609
1eb450c
%prep
1eb450c
%setup -q
c020675
%patch0 -p1 -b .init
c020675
%patch1 -p1 -b .shutdown
4105a1e
%patch3 -p1 -b .systemd
7b66028
%patch4 -p1 -b .fixgui
bb7a609
2cb7a21
#we will handle fedora/redhat part ourselfs
b3ae5e3
printf 'install:\n\techo skipped\n' >platforms/redhat/Makefile
2cb7a21
1eb450c
%build
d25990d
%global _hardened_build 1
f85a07e
cp -p /usr/lib/rpm/config.{guess,sub} autoconf/
7e973bc
export CPPFLAGS="$RPM_OPT_FLAGS -DNETSNMP_NO_LEGACY_DEFINITIONS -Wno-format-security -Wno-error=format-security"
7e973bc
export CXXFLAGS="$CPPFLAGS"
7e973bc
export CFLAGS="$CPPFLAGS"
1eb450c
%configure \
1eb450c
        --sysconfdir="%{_sysconfdir}/apcupsd" \
390086c
        --with-cgi-bin="%{_localstatedir}/www/apcupsd" \
e8cf9f4
        --sbindir=/sbin \
1eb450c
        --enable-cgi \
1eb450c
        --enable-pthreads \
1eb450c
        --enable-net \
1eb450c
        --enable-apcsmart \
1eb450c
        --enable-dumb \
390086c
        --enable-net-snmp \
390086c
        --enable-snmp \
1eb450c
        --enable-usb \
0210417
        --enable-modbus-usb \
bb7a609
        --enable-gapcmon \
bb7a609
        --enable-pcnet \
390086c
        --with-libwrap=%{_libdir} \
1eb450c
        --with-serial-dev= \
1eb450c
        --with-upstype=usb \
1eb450c
        --with-upscable=usb \
2ff2000
        --with-lock-dir=/var/lock \
1eb450c
        APCUPSD_MAIL=/bin/mail
29cee69
make %{?_smp_mflags}
1eb450c
1eb450c
%install
1eb450c
rm -rf $RPM_BUILD_ROOT
1eb450c
390086c
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/apcupsd
1eb450c
1eb450c
make DESTDIR=$RPM_BUILD_ROOT install
1eb450c
1eb450c
install -m744 platforms/apccontrol \
1eb450c
              $RPM_BUILD_ROOT%{_sysconfdir}/apcupsd/apccontrol
f85a07e
4105a1e
# systemd support
4105a1e
install -p -D -m644 apcupsd.service $RPM_BUILD_ROOT/lib/systemd/system/apcupsd.service
4105a1e
install -p -D -m755 apcupsd_shutdown $RPM_BUILD_ROOT/lib/systemd/system-shutdown/apcupsd_shutdown
1eb450c
390086c
install -d %{buildroot}%{_sysconfdir}/logrotate.d
390086c
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
390086c
install -d %{buildroot}%{_sysconfdir}/httpd/conf.d
390086c
install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
0210417
install -D -m0644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/apcupsd64x64.png
390086c
c96b4bc
desktop-file-install \
c96b4bc
%if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7)
c96b4bc
        --vendor="fedora" \
c96b4bc
%endif
bb7a609
        --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
0210417
        --set-icon=apcupsd64x64 \
bb7a609
        --delete-original \
bb7a609
        ${RPM_BUILD_ROOT}%{_datadir}/applications/gapcmon.desktop
bb7a609
bb7a609
# Cleanup for later %doc processing
6fb2da4
chmod -x examples/*.c
1eb450c
rm examples/*.in
1eb450c
1eb450c
1eb450c
%clean
1eb450c
rm -rf $RPM_BUILD_ROOT
1eb450c
1eb450c
1eb450c
%files
1eb450c
%defattr(-,root,root,-)
2cc086d
%doc COPYING ChangeLog examples ReleaseNotes
1eb450c
%dir %{_sysconfdir}/apcupsd
4105a1e
/lib/systemd/system/%{name}.service
4105a1e
/lib/systemd/system-shutdown/apcupsd_shutdown
1eb450c
%config(noreplace) %{_sysconfdir}/apcupsd/apcupsd.conf
1eb450c
%attr(0755,root,root) %{_sysconfdir}/apcupsd/apccontrol
a4b039c
%config(noreplace) %{_sysconfdir}/apcupsd/changeme
a4b039c
%config(noreplace) %{_sysconfdir}/apcupsd/commfailure
a4b039c
%config(noreplace) %{_sysconfdir}/apcupsd/commok
a4b039c
%config(noreplace) %{_sysconfdir}/apcupsd/offbattery
a4b039c
%config(noreplace) %{_sysconfdir}/apcupsd/onbattery
390086c
%config(noreplace) %{_sysconfdir}/logrotate.d/apcupsd
b4949ce
%{_datadir}/hal/fdi/policy/20thirdparty/80-apcupsd-ups-policy.fdi
e8cf9f4
%attr(0755,root,root) /sbin/*
1eb450c
%{_mandir}/*/*
1eb450c
1eb450c
%files cgi
1eb450c
%defattr(-,root,root,-)
1eb450c
%config(noreplace) %{_sysconfdir}/apcupsd/apcupsd.css
390086c
%config(noreplace) %{_sysconfdir}/httpd/conf.d/apcupsd.conf
29cee69
%config(noreplace) %{_sysconfdir}/apcupsd/hosts.conf
29cee69
%config(noreplace) %{_sysconfdir}/apcupsd/multimon.conf
390086c
%{_localstatedir}/www/apcupsd/
1eb450c
bb7a609
%files gui
bb7a609
%defattr(-,root,root,-)
bb7a609
%{_bindir}/gapcmon
c96b4bc
%{_datadir}/applications/*gapcmon.desktop
bb7a609
%{_datadir}/pixmaps/apcupsd.png
0210417
%{_datadir}/pixmaps/apcupsd64x64.png
bb7a609
%{_datadir}/pixmaps/charging.png
bb7a609
%{_datadir}/pixmaps/gapc_prefs.png
bb7a609
%{_datadir}/pixmaps/onbatt.png
bb7a609
%{_datadir}/pixmaps/online.png
bb7a609
%{_datadir}/pixmaps/unplugged.png
bb7a609
1eb450c
1eb450c
%post
461ea25
%systemd_post apcupsd.service
1eb450c
1eb450c
%preun
461ea25
%systemd_preun apcupsd.service
602b28d
602b28d
%postun
461ea25
%systemd_postun_with_restart apcupsd.service
1eb450c
1eb450c
1eb450c
%changelog
7e973bc
* Thu Jun 02 2016 Michal Hlavinka <mhlavink@redhat.com> - 3.14.14-1
7e973bc
- updated to 3.14.14
7e973bc
8068c0a
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.13-5
8068c0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8068c0a
0210417
* Mon Nov 23 2015 Michal Hlavinka <mhlavink@redhat.com> - 3.14.13-4
0210417
- fix apcaccess crash if apcupsd is not running (#1236367,#1197383)
0210417
- enabled modbus-usb (#1195071)
0210417
- add bigger icon (#1157532)
0210417
22f7865
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.13-3
22f7865
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
22f7865
2a688e3
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.14.13-2
2a688e3
- Rebuilt for GCC 5 C++11 ABI change
2a688e3
45b813e
* Tue Feb 03 2015 Michal Hlavinka <mhlavink@redhat.com> - 3.14.13-1
45b813e
- apcupsd updated to 3.14.13
45b813e
9be2c29
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.12-3
9be2c29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9be2c29
c36afd6
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.12-2
c36afd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c36afd6
2ff2000
* Mon Mar 31 2014 Michal Hlavinka <mhlavink@redhat.com> - 3.14.12-1
2ff2000
- apcupsd updated to 3.14.12
2ff2000
- force lock dir to /var/lock (#1064099)
2ff2000
a42b8ea
* Mon Feb 17 2014 Michal Hlavinka <mhlavink@redhat.com> - 3.14.11-1
a42b8ea
- apcupsd updated to 3.14.11
a42b8ea
9d899e2
* Tue Jan 21 2014 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-14
9d899e2
- reduce amount of debug messages (#1053324)
9d899e2
f4fd99b
* Wed Aug 14 2013 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-13
f4fd99b
- fix aarch64 support (#925007)
f4fd99b
d04b96f
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.10-12
d04b96f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d04b96f
3a6416c
* Tue Jun 11 2013 Remi Collet <rcollet@redhat.com> - 3.14.10-11
3a6416c
- rebuild for new GD 2.1.0
3a6416c
d25990d
* Fri May 17 2013 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-10
d25990d
- make executables hardened (#955341)
d25990d
c96b4bc
* Thu Feb 14 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 3.14.10-9
c96b4bc
- Remove --vendor flag to desktop-file-install on F19+
c96b4bc
2cc086d
* Tue Feb 05 2013 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-8
2cc086d
- remove obsolete documentation
2cc086d
fce6302
* Tue Oct 30 2012 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-7
fce6302
- fix configuration for httpd 2.4 (#871361)
fce6302
461ea25
* Fri Aug 24 2012 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-6
461ea25
- scriptlets replaced with new systemd macros (#851227)
461ea25
6433a61
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.10-5
6433a61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
6433a61
8724552
* Mon Feb 13 2012 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-4
8724552
- start after network is up (#789191)
8724552
b0541bd
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.10-3
b0541bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b0541bd
2bc9f59
* Mon Dec 19 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-2
2bc9f59
- remove powerfail flag on boot (#768684)
2bc9f59
35decf9
* Mon Dec 12 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-1
35decf9
- apcupsd updated to 3.14.10
35decf9
- fix MODEL vs. APCMODEL confusion. Remove APCMODEL and rename old MODEL
35decf9
  aka 'mode' to DRIVER.
35decf9
7b66028
* Thu Oct 20 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.9-2
7b66028
- fix crash in gui (#578276), patch by Michal Sekletar
7b66028
aafe39b
* Mon Jul 25 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.9-1
aafe39b
- apcupsd updated to 3.14.9
aafe39b
1489f27
* Fri Jul 08 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-9
1489f27
- rebuilt for net-snmp update
1489f27
4105a1e
* Thu Jun 16 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-8
4105a1e
- move from SysV init script to systemd service file
4105a1e
34be39d
* Wed Feb 09 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.9-7
34be39d
- add readme file to doc explaining needed configuration of halt script
34be39d
8e2743b
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.8-6
8e2743b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8e2743b
2228e70
* Thu Dec 02 2010 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-5
2228e70
- do not attempt to invoke directory as a script (#659219)
2228e70
2228e70
* Fri Nov 05 2010 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-4
d4dfa29
- rebuilt for library update
d4dfa29
Jesse Keating a4c05a9
* Wed Sep 29 2010 jkeating - 3.14.8-3
Jesse Keating a4c05a9
- Rebuilt for gcc bug 634757
Jesse Keating a4c05a9
e55071a
* Wed Sep 22 2010 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-2
e55071a
- fix c++ code linking (FTBFS) (#631288)
e55071a
65c757a
* Mon Jan 18 2010 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-1
65c757a
- updated to 3.14.8
65c757a
307687a
* Fri Sep 18 2009 Michal Hlavinka <mhlavink@redhat.com> - 3.14.7-3
307687a
- fix building with new net-snmp version
307687a
28511b0
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 3.14.7-2
28511b0
- rebuilt with new openssl
28511b0
63cf6e2
* Mon Aug 03 2009 Michal Hlavinka <mhlavink@redhat.com> - 3.14.7-1
63cf6e2
- updated to 3.14.7
63cf6e2
eabbcd8
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.6-2
eabbcd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
eabbcd8
1afe752
* Mon May 18 2009 Michal Hlavinka <mhlavink@redhat.com> - 3.14.6-1
1afe752
- update to 3.14.6
1afe752
f4fd99b
* Tue Feb 24 2009 Michal Hlavinka <mhlavink@redhat.com> - 3.14.5-3
61d2804
- fix build with gcc 4.4
61d2804
24b4dc2
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.5-2
24b4dc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
24b4dc2
6fb2da4
* Thu Jan 22 2009 Michal Hlavinka <mhlavink@redhat.com> - 3.14.5-1
6fb2da4
- update to 3.14.5
6fb2da4
a219c35
* Thu Jan 15 2009 Tomas Mraz <tmraz@redhat.com> - 3.14.4-3
a219c35
- rebuild with new openssl
a219c35
e8cf9f4
* Fri Jun 06 2008 Tomas Smetana <tsmetana@redhat.com> - 3.14.4-2
e8cf9f4
- drop useless build requirements
29cee69
- fix #448637 - hosts.conf and multimon.conf should be in apcupsd-cgi
e8cf9f4
- move binaries to /sbin (related #346271)
29cee69
f85a07e
* Wed May 28 2008 Tomas Smetana <tsmetana@redhat.com> - 3.14.4-1
f85a07e
- new upstream version
f85a07e
9539120
* Tue Feb 12 2008 Tomas Smetana <tsmetana@redhat.com> - 3.14.3-2.1
9539120
- rebuild (gcc-4.3)
9539120
c020675
* Wed Jan 30 2008 Tomas Smetana <tsmetana@redhat.com> - 3.14.3-2
c020675
- fix #348701 - apcupsd control script does not invoke shutdown properly
c020675
b4949ce
* Wed Jan 23 2008 Tomas Smetana <tsmetana@redhat.com> - 3.14.3-1
b4949ce
- Update to 3.14.3
b4949ce
d0774aa
* Wed Oct 10 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.2-1
d0774aa
- Update to 3.14.2, remove upstreamed patches
d0774aa
602b28d
* Wed Aug  1 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.1-3
602b28d
- Add patch to close open file descriptors (bug #247162)
602b28d
- Stop/restart service as needed on removal/upgrade
602b28d
f4fd99b
* Mon Jun 04 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.1-2
6784ab3
- Add patch for linux USB UPS detection (bug #245864)
6784ab3
50b4058
* Tue May 29 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.1-1
50b4058
- Update to 3.14.1
50b4058
7ea1ac0
* Mon Apr 23 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.0-2
7ea1ac0
- Fix init script for LSB compliance (bug #237532)
7ea1ac0
d813a03
* Mon Feb 12 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.0-1
d813a03
- Update to 3.14.0
d813a03
a4b039c
* Fri Jan  5 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.13.9-2
a4b039c
- Mark everything in /etc/apcupsd noreplace
a4b039c
- Change BR to tcp_wrappers-devel
a4b039c
bb7a609
* Thu Nov 30 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.13.9-1
bb7a609
- Update to 3.13.9, add gui package
bb7a609
29cc871
* Mon Oct  9 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.4-3
29cc871
- Fix /etc/httpd/conf.d/apcupsd.conf so DirectoryIndex works (bug #209952).
29cc871
  Patch from Clive Messer (clive@vacuumtube.org.uk)
29cc871
4212905
* Tue Aug 29 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.4-2
4212905
- Rebuild for FC6
4212905
a6ddb1b
* Mon Aug 21 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.4-1
a6ddb1b
- Update to 3.12.4
a6ddb1b
d285013
* Tue Jan 10 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.2-1
d285013
- Update to 3.12.2
d285013
- Don't strip binaries
d285013
70c71f8
* Tue Jan 10 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.1-1
70c71f8
- Update to 3.12.1
70c71f8
1769f57
* Wed Jan  4 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.0-1
1769f57
- Update to 3.12.0
1769f57
0b3ed40
* Tue Jan  3 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-7
0b3ed40
- Rebuild
0b3ed40
eb89ad7
* Wed Dec 21 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-6
eb89ad7
- Rebuild
eb89ad7
61de78e
* Wed Nov 16 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-5
61de78e
- Bump for new openssl
61de78e
390086c
* Fri Nov  4 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-4
390086c
- Add logrotate script for /var/log/apcupsd.events
390086c
- Add apache configuration script and change cgi directory to
390086c
  /var/www/apcupsd
390086c
- Compile in snmp, net-snmp, powerflute, nls, add tcp_wrappers support
390086c
1eb450c
* Mon Oct 17 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-3
bb7a609
- Removed %%{_smp_mflags} from make, broke builds
1eb450c
- Patch init file to not start automatically and add reload
1eb450c
- Mark css file config
1eb450c
- Require /sbin/chkconfig
1eb450c
1eb450c
* Mon Oct 17 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-2
bb7a609
- Add %%defattr to -cgi package
1eb450c
1eb450c
* Wed Aug 17 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-1
1eb450c
- Initial Fedora Version