2007-01-16 00:29:18 +01:00
|
|
|
#
|
2012-10-09 13:53:32 +02:00
|
|
|
# spec file for package pcfclock
|
2007-01-16 00:29:18 +01:00
|
|
|
#
|
2020-09-22 01:39:13 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2007-01-16 00:29:18 +01:00
|
|
|
#
|
2008-08-23 01:46:14 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2020-09-22 01:39:13 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:29:18 +01:00
|
|
|
#
|
|
|
|
|
2021-08-25 10:41:05 +02:00
|
|
|
%if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300
|
|
|
|
# systemd-rpm-macros(or kmod) is wrong in 15.2
|
|
|
|
%define _modprobedir /lib/modprobe.d
|
|
|
|
%endif
|
2007-01-16 00:29:18 +01:00
|
|
|
Name: pcfclock
|
|
|
|
Version: 0.44
|
2012-10-09 13:53:32 +02:00
|
|
|
Release: 0
|
2007-01-16 00:29:18 +01:00
|
|
|
Summary: Pcfclock kernel driver
|
2018-06-19 15:39:24 +02:00
|
|
|
License: GPL-2.0-or-later
|
2007-01-16 00:29:18 +01:00
|
|
|
Group: System/Kernel
|
2020-09-22 01:39:13 +02:00
|
|
|
URL: http://www-stud.ims.uni-stuttgart.de/~voegelas/pcf.html
|
2007-01-16 00:29:18 +01:00
|
|
|
Source: pcfclock-%{version}.tar.gz
|
|
|
|
Source1: Makefile
|
|
|
|
Source2: preamble
|
2012-10-09 13:53:32 +02:00
|
|
|
Source3: pcfclock.conf
|
|
|
|
Patch0: pcfclock-nomodule.patch
|
2007-01-16 00:29:18 +01:00
|
|
|
Patch1: pcfclock-module_param.patch
|
|
|
|
Patch2: pcfclock-no_devfs.patch
|
2008-08-23 01:46:14 +02:00
|
|
|
Patch3: pcfclock-include.patch
|
2015-03-25 10:42:09 +01:00
|
|
|
Patch4: pcfclock-linux-3.19.patch
|
2017-09-11 17:00:16 +02:00
|
|
|
Patch5: pcfclock-linux-4.12.patch
|
2020-09-22 01:39:13 +02:00
|
|
|
Patch6: pcfclock-linux-5.8.patch
|
2012-10-09 13:53:32 +02:00
|
|
|
BuildRequires: kernel-source
|
|
|
|
BuildRequires: kernel-syms
|
2017-11-15 12:18:00 +01:00
|
|
|
BuildRequires: libelf-devel
|
2012-10-09 13:53:32 +02:00
|
|
|
BuildRequires: module-init-tools
|
|
|
|
Requires: pcfclock-kmp
|
|
|
|
# systemd-tmpfiles
|
|
|
|
Requires(post): systemd
|
2007-01-16 00:29:18 +01:00
|
|
|
ExcludeArch: s390 s390x
|
|
|
|
%suse_kernel_module_package -p %_sourcedir/preamble kdump um xen xenpae iseries64
|
|
|
|
|
|
|
|
%description
|
|
|
|
The pcfclock(4) driver for GNU/Linux supports the parallel port radio
|
|
|
|
clock sold by Conrad Electronic under order number 967602. The radio
|
|
|
|
clock, which is put between your parallel port and your printer,
|
|
|
|
receives the legal German time, i.e. CET or CEST, from the DCF77
|
|
|
|
transmitter and uses it to set its internal quartz clock. The DCF77
|
|
|
|
transmitter is located near to Frankfurt/Main and covers a radius of
|
|
|
|
more than 1500 kilometers.
|
|
|
|
|
|
|
|
%package KMP
|
|
|
|
Summary: Pcfclock kernel driver
|
|
|
|
Group: System/Kernel
|
|
|
|
|
|
|
|
%description KMP
|
|
|
|
The pcfclock(4) driver for GNU/Linux supports the parallel port radio
|
|
|
|
clock sold by Conrad Electronic under order number 967602. The radio
|
|
|
|
clock, which is put between your parallel port and your printer,
|
|
|
|
receives the legal German time, i.e. CET or CEST, from the DCF77
|
|
|
|
transmitter and uses it to set its internal quartz clock. The DCF77
|
|
|
|
transmitter is located near to Frankfurt/Main and covers a radius of
|
|
|
|
more than 1500 kilometers.
|
|
|
|
|
|
|
|
%prep
|
2012-10-09 13:53:32 +02:00
|
|
|
%setup -q
|
|
|
|
%patch0
|
2007-01-16 00:29:18 +01:00
|
|
|
%patch1
|
|
|
|
%patch2
|
2008-08-23 01:46:14 +02:00
|
|
|
%patch3
|
2015-03-25 10:42:09 +01:00
|
|
|
%patch4
|
2017-09-11 17:00:16 +02:00
|
|
|
%patch5
|
2020-09-22 01:39:13 +02:00
|
|
|
%patch6
|
2007-01-16 00:29:18 +01:00
|
|
|
mkdir source
|
|
|
|
mkdir obj
|
2012-10-09 13:53:32 +02:00
|
|
|
cp -a linux/pcfclock.c %{SOURCE1} \
|
2007-01-16 00:29:18 +01:00
|
|
|
source
|
|
|
|
|
|
|
|
%build
|
2017-09-11 19:34:28 +02:00
|
|
|
%configure --without-linux
|
|
|
|
make %{?_smp_mflags}
|
2007-01-16 00:29:18 +01:00
|
|
|
for flavor in %flavors_to_build; do
|
|
|
|
rm -rf obj/$flavor
|
|
|
|
cp -r source obj/$flavor
|
2018-06-19 15:39:24 +02:00
|
|
|
make -C /usr/src/linux-obj/%_target_cpu/$flavor %{?linux_make_arch} modules \
|
2017-09-11 19:34:28 +02:00
|
|
|
M=$PWD/obj/$flavor %{?_smp_mflags}
|
2007-01-16 00:29:18 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
%install
|
2012-10-09 13:53:32 +02:00
|
|
|
%make_install
|
2007-05-11 12:32:53 +02:00
|
|
|
# install manpage
|
|
|
|
make -C linux install DESTDIR=%{buildroot}
|
2007-01-16 00:29:18 +01:00
|
|
|
# install kernel modules
|
2012-10-09 13:53:32 +02:00
|
|
|
export INSTALL_MOD_PATH=%{buildroot}
|
2007-01-16 00:29:18 +01:00
|
|
|
export INSTALL_MOD_DIR=updates
|
|
|
|
for flavor in %flavors_to_build; do
|
2018-06-19 15:39:24 +02:00
|
|
|
make -C /usr/src/linux-obj/%_target_cpu/$flavor %{?linux_make_arch} modules_install \
|
2007-01-16 00:29:18 +01:00
|
|
|
M=$PWD/obj/$flavor
|
|
|
|
done
|
2021-08-25 10:41:05 +02:00
|
|
|
mkdir -p %{buildroot}%{_modprobedir}
|
|
|
|
echo "alias char-major-181 pcfclock" > %{buildroot}%{_modprobedir}/50-pcfclock.conf
|
2015-03-25 10:42:09 +01:00
|
|
|
%if 0%{?suse_version} > 1140
|
2021-08-25 10:41:05 +02:00
|
|
|
mkdir -p %{buildroot}%{_tmpfilesdir}
|
|
|
|
install -m 0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}
|
2015-03-25 10:42:09 +01:00
|
|
|
%endif
|
2012-10-09 13:53:32 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
# Create devices nodes at installation time
|
2021-08-25 10:41:05 +02:00
|
|
|
systemd-tmpfiles --create %{_tmpfilesdir}/pcfclock.conf
|
2007-01-16 00:29:18 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README
|
2021-08-25 10:41:05 +02:00
|
|
|
%{_mandir}/man4/pcfclock.4%{?ext_man}
|
|
|
|
%{_mandir}/man8/pcfdate.8%{?ext_man}
|
2012-10-09 13:53:32 +02:00
|
|
|
%{_sbindir}/pcfdate
|
2021-08-25 10:41:05 +02:00
|
|
|
%{_modprobedir}/50-pcfclock.conf
|
2015-03-25 10:42:09 +01:00
|
|
|
%if 0%{?suse_version} > 1140
|
2021-08-25 10:41:05 +02:00
|
|
|
%{_tmpfilesdir}/pcfclock.conf
|
2015-03-25 10:42:09 +01:00
|
|
|
%endif
|
2007-01-16 00:29:18 +01:00
|
|
|
|
2007-04-04 22:10:24 +02:00
|
|
|
%changelog
|