]> git.pld-linux.org Git - packages/lm_sensors.git/blobdiff - lm_sensors.spec
- up to 2.10.3
[packages/lm_sensors.git] / lm_sensors.spec
index 29ed603d4ee4805a2b2cbef0916aabd266dd68e0..45b34dd2c2e28130b37e3b9df5353cadc0adcf25 100644 (file)
-
-# conditional build
-# _without_dist_kernel         without kernel for distributions
-
-%define                _kernel_ver     %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2)
-%define                _kernel_ver_str %(echo %{_kernel_ver} | sed s/-/_/g)
-%define                _rel 7
-
+# TODO
+# - unpackaged:
+#   /usr/sbin/fancontrol.pl (isn't that the same as sh fancontrol script?)
+# - a big trigger warning how to use fancontrol and to init it first
+#
+%define                cmodule         /etc/sysconfig/sensors_modules
+%define                cdaemon         /etc/sysconfig/sensors
+%define                smodule         /etc/rc.d/init.d/sensors_modules
+%define                sdaemon         /etc/rc.d/init.d/sensors
+
+%include       /usr/lib/rpm/macros.perl
 Summary:       Hardware health monitoring
-Summary(pl):   Monitor stanu sprzêtu
-Summary(pt_BR):        Ferramentas para monitoração do hardware
+Summary(pl.UTF-8):     Monitor stanu sprzętu
+Summary(pt_BR.UTF-8):  Ferramentas para monitoração do hardware
+Summary(ru.UTF-8):     Утилиты для мониторинга аппаратуры
+Summary(uk.UTF-8):     Утиліти для моніторингу апаратури
 Name:          lm_sensors
-Version:       2.6.2
-Release:       %{_rel}
+Version:       2.10.3
+Release:       1
 License:       GPL
 Group:         Applications/System
-Group(de):     Applikationen/System
-Group(es):     Aplicaciones/Sistema
-Group(pl):     Aplikacje/System
-Group(pt_BR):  Aplicações/Sistema
-Source0:       http://www.netroedge.com/~lm78/archive/%{name}-%{version}.tar.gz
+Source0:       http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.gz
+# Source0-md5: 55d77146fbd56c205a9f81d262b9453c
 Source1:       sensors.init
 Source2:       sensors.sysconfig
+Source3:       fancontrol.init
+Source4:       fancontrol.sysconfig
+Source5:       sensors.sh
+Source6:       sensors_modules.init
+Source7:       sensors_modules.sysconfig
 Patch0:                %{name}-make.patch
-URL:           http://www.netroedge.com/~lm78/
+Patch1:                %{name}-ppc.patch
+Patch2:                %{name}-iconv-in-libc.patch
+Patch3:                %{name}-sensors-detect-PATH.patch
+URL:           http://www.lm-sensors.nu/
 BuildRequires: bison
 BuildRequires: flex >= 2.5.1
-%{!?_without_dist_kernel:BuildRequires:        i2c-devel >= 2.6.0}
-PreReq:                /sbin/chkconfig
-PreReq:                /sbin/ldconfig
-Requires:      %{name}-modules = %{version}
+BuildRequires: perl-modules >= 5.6
+BuildRequires: rpm-perlprov >= 3.0.3-16
+BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rrdtool-devel >= 1.2.10
+BuildRequires: sysfsutils-devel
+Requires:      %{name}-libs = %{version}-%{release}
+Requires:      dev >= 2.9.0-13
+Requires:      dmidecode
+Requires:      %{name}-config
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Obsoletes:     liblm_sensors1
 
 %description
 Tools for monitoring the hardware health of Linux systems containing
 hardware health monitoring hardware such as the LM78 and LM75.
 
-%description -l pl
-Narzêdzie do monitorowania sprzêtu w systemach Linuksowych
-wyposa¿onych w sprzêt monitoruj±cy, taki jak LM78 lub LM75.
+%description -l pl.UTF-8
+Narzędzie do monitorowania sprzętu w systemach linuksowych
+wyposażonych w sprzęt monitorujący, taki jak LM78 lub LM75.
 
-%description -l pt_BR
-Ferramentas para monitoração do hardware. Contém uma coleção de
-módulos para acesso genérico ao barramento SMBus e monitoração de
+%description -l pt_BR.UTF-8
+Ferramentas para monitoração do hardware. Contém uma coleção de
+módulos para acesso genérico ao barramento SMBus e monitoração de
 hardware.
 
+%description -l ru.UTF-8
+Пакет lm_sensors содержит набор модулей для стандартного доступа к
+SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная
+поддержка, отсутствующая в стандартных старых ядрах 2.2.XX!
+
+%description -l uk.UTF-8
+Пакет lm_sensors містить набір модулів для стандартного доступу до
+SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка,
+яка відсутня у стандартних старих ядрах 2.2.XX!
+
+%package libs
+Summary:       lm_sensors library
+Summary(pl.UTF-8):     Biblioteka lm_sensors
+Group:         Libraries
+Obsoletes:     liblm_sensors1
+Conflicts:     lm_sensors <= 2.9.2-2
+
+%description libs
+lm_sensors library.
+
+%description libs -l pl.UTF-8
+Biblioteka lm_sensors.
+
 %package devel
 Summary:       Header files for lm_sensors
-Summary(pl):   Pliki nag³ówkowe dla lm_sensors
-Summary(pt_BR):        Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
+Summary(pl.UTF-8):     Pliki nagłówkowe dla lm_sensors
+Summary(pt_BR.UTF-8):  Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
+Summary(ru.UTF-8):     Файлы разработчика для программ, использующих lm_sensors
+Summary(uk.UTF-8):     Файли програміста для програм, які використовують lm_sensors
 Group:         Development/Libraries
-Group(de):     Entwicklung/Libraries
-Group(es):     Desarrollo/Bibliotecas
-Group(fr):     Development/Librairies
-Group(pl):     Programowanie/Biblioteki
-Group(pt_BR):  Desenvolvimento/Bibliotecas
-Group(ru):     òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
-Group(uk):     òÏÚÒÏÂËÁ/â¦Â̦ÏÔÅËÉ
-Requires:      %{name} = %{version}
+Requires:      %{name}-libs = %{version}-%{release}
 Obsoletes:     liblm_sensors1-devel
 
 %description devel
 Header files for lm_sensors.
 
-%description devel -l pl
-Pliki nag³ówkowe dla lm_sensors.
+%description devel -l pl.UTF-8
+Pliki nagłówkowe dla lm_sensors.
 
-%description devel -l pt_BR
-Arquivos necessários ao desenvolvimento de programas que usem o
+%description devel -l pt_BR.UTF-8
+Arquivos necessários ao desenvolvimento de programas que usem o
 lm_sensors.
 
+%description devel -l ru.UTF-8
+Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для
+построения программ, использующих данные сенсоров.
+
+%description devel -l uk.UTF-8
+Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для
+побудови програм, які використовують дані сенсорів.
+
 %package static
 Summary:       Static libraries for lm_sensors
-Summary(pl):   Biblioteki statyczne dla lm_sensors
-Summary(pt_BR):        Bibliotecas estáticas para desenvolvimento com lm_sensors
+Summary(pl.UTF-8):     Biblioteki statyczne dla lm_sensors
+Summary(pt_BR.UTF-8):  Bibliotecas estáticas para desenvolvimento com lm_sensors
+Summary(ru.UTF-8):     Статическая библиотека для программ, использующих lm_sensors
+Summary(uk.UTF-8):     Статична бібліотека для програм, які використовують lm_sensors
 Group:         Development/Libraries
-Group(de):     Entwicklung/Libraries
-Group(es):     Desarrollo/Bibliotecas
-Group(fr):     Development/Librairies
-Group(pl):     Programowanie/Biblioteki
-Group(pt_BR):  Desenvolvimento/Bibliotecas
-Group(ru):     òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
-Group(uk):     òÏÚÒÏÂËÁ/â¦Â̦ÏÔÅËÉ
-Requires:      %{name}-devel = %{version}
+Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static libraries for lm_sensors.
 
-%description static -l pl
+%description static -l pl.UTF-8
 Biblioteki statyczne dla lm_sensors.
 
-%description static -l pt_BR
-Bibliotecas estáticas para desenvolvimento com lm_sensors
+%description static -l pt_BR.UTF-8
+Bibliotecas estáticas para desenvolvimento com lm_sensors
 
-%package -n kernel-misc-%{name}
-Summary:       Kernel modules for various buses and monitor chips
-Summary(pl):   Modu³y j±dra dla ró¿nego rodzaju sensorów
-Group:         Applications/System
-Group(de):     Applikationen/System
-Group(es):     Aplicaciones/Sistema
-Group(pl):     Aplikacje/System
-Group(pt_BR):  Aplicações/Sistema
-Release:       %{_rel}@%{_kernel_ver_str}
-Prereq:                /sbin/depmod
-%{!?_without_dist_kernel:Requires:     i2c >= 2.6.0}
-%{!?_without_dist_kernel:Conflicts:    kernel < %{_kernel_ver}, kernel > %{_kernel_ver}}
-%{!?_without_dist_kernel:Conflicts:    kernel-smp}
-Obsoletes:     %{name}-modules
-Obsoletes:     kernel-smp-misc-%{name}
-Provides:      %{name}-modules = %{version}
-
-%description -n kernel-misc-%{name}
-Kernel modules for various buses and monitor chips.
-
-%description -n kernel-misc-%{name} -l pl
-Modu³y j±dra dla ró¿nego rodzaju sensorów monitoruj±cych.
-
-%package -n kernel-smp-misc-%{name}
-Summary:       Kernel modules for various buses and monitor chips
-Summary(pl):   Modu³y j±dra dla ró¿nego rodzaju sensorów
+%description static -l ru.UTF-8
+Пакет lm_sensors-static включает статические библиотеки, необходимые
+для построения программ, использующих данные сенсоров.
+
+%description static -l uk.UTF-8
+Пакет lm_sensors-static містить статичні бібліотеки, необхідні для
+побудови програм, які використовують дані сенсорів.
+
+%package config-default
+Summary:       Default sensors configuration files
+Summary(pl.UTF-8):     Domyślne pliki konfiguracyjne lm_sensors
 Group:         Applications/System
-Group(de):     Applikationen/System
-Group(es):     Aplicaciones/Sistema
-Group(pl):     Aplikacje/System
-Group(pt_BR):  Aplicações/Sistema
-Release:       %{_rel}@%{_kernel_ver_str}
-Prereq:                /sbin/depmod
-%{!?_without_dist_kernel:Requires:     i2c >= 2.6.0}
-%{!?_without_dist_kernel:Conflicts:     kernel < %{_kernel_ver}, kernel > %{_kernel_ver}}
-%{!?_without_dist_kernel:Conflicts:     kernel-up}
-Obsoletes:     %{name}-modules
-Obsoletes:     kernel-misc-%{name}
-Provides:      %{name}-modules = %{version}
-
-%description -n kernel-smp-misc-%{name}
-Kernel SMP modules for various buses and monitor chips.
-
-%description -n kernel-smp-misc-%{name} -l pl
-Modu³y j±dra SMP dla ró¿nego rodzaju sensorów monitoruj±cych.
+Requires:      %{name} = %{version}-%{release}
+Provides:      %{name}-config
+
+%description config-default
+Default configuration files for lm_sensors.
+
+%description config-default -l pl.UTF-8
+Domyślne pliki konfiguracyjne lm_sensors.
+
+%package sensord
+Summary:       Sensord daemon
+Summary(pl.UTF-8):     Demon sensord
+Group:         Daemons
+Requires(post,preun):  /sbin/chkconfig
+Requires:      %{name} = %{version}-%{release}
+Requires:      %{name}-config
+Requires:      rc-scripts
+
+%description sensord
+Sensord daemon.
+
+%description sensord -l pl.UTF-8
+Demon sensord.
+
+%package fancontrol
+Summary:       Fancontrol daemon
+Summary(pl.UTF-8):     Demon sterowania wiatraczkami
+Group:         Daemons
+Requires(post,preun):  /sbin/chkconfig
+Requires:      %{name} = %{version}-%{release}
+Requires:      %{name}-sensord = %{version}-%{release}
+Requires:      rc-scripts
+
+%description fancontrol
+Fancontrol daemon monitors current temperature of the computer and
+adjusts fans speed acordingly.
+
+It is crucial to correctly configure this daemon (via running service
+fancontrol init) and ensuring, that the temperature levels are set not
+to burn the insides of the computer!
+
+%description fancontrol -l pl.UTF-8
+Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
+odpowiednio prędkość wiatraków.
+
+Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez
+uruchomienie service fancontrol init) oraz upewnić się, że progi
+temperatury są ustawione poprawnie, by nie spalić wnętrza komputera!
 
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
-#up
-%{__make} \
+%{__make} user \
+       CC="%{__cc}" \
        OPTS="%{rpmcflags}" \
+       LIBDIR=%{_libdir} \
        LINUX=/dev/null \
        LINUX_HEADERS=%{_kernelsrcdir}/include \
-       I2C_HEADERS=%{_kernelsrcdir}/include \
-       SMP=0
-
-%{__make} install-kernel \
-        MODDIR=kernel-up-modules
-%{__make} install-kernel-busses \
-        MODDIR=kernel-up-modules
-%{__make} install-kernel-chips \
-        MODDIR=kernel-up-modules
-
-%{__make} clean
-
-#smp
-%{__make} \
-        OPTS="%{rpmcflags} -D__KERNEL_SMP=1" \
-        LINUX=/dev/null \
-        LINUX_HEADERS=%{_kernelsrcdir}/include \
-        I2C_HEADERS=%{_kernelsrcdir}/include \
-        SMP=1
-                                       
+       I2C_HEADERS=/usr/include \
+       PROG_EXTRA:="sensord" \
+       SYSFS_SUPPORT:=1
+
+%{__make} -C prog/eepromer \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags} -I../../kernel/include"
+
 %install
 rm -rf $RPM_BUILD_ROOT
+
 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
-       $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/lib/modules/%{_kernel_ver}/misc}
+       $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
 
-%{__make} install \
+%{__make} user_install \
        DESTDIR=$RPM_BUILD_ROOT \
        PREFIX=%{_prefix} \
        ETCDIR=%{_sysconfdir} \
+       LIBDIR=%{_libdir} \
        MANDIR=%{_mandir} \
-       MODDIR=/lib/modules/%{_kernel_ver}smp/misc
+       PROG_EXTRA:="sensord" \
+       LINUX=/dev/null \
+       LINUX_HEADERS=%{_kernelsrcdir}/include \
+       I2C_HEADERS=/usr/include
 
-install prog/sensord/sensord $RPM_BUILD_ROOT%{_sbindir}
-install prog/sensord/sensord.8 $RPM_BUILD_ROOT%{_mandir}/man8
+install prog/eepromer/{eeprom,eepromer}        $RPM_BUILD_ROOT%{_sbindir}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
+install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
+install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
+install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors_modules
+install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/sensors_modules
 
-install kernel-up-modules/* $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc 
-
-gzip -9nf BACKGROUND BUGS CHANGES README README.thinkpad TODO
-find doc -type f ! -name \*.\* -a ! -name \*ticket | xargs gzip -9nf
+# i2c API for userspace - included in linux-libc-headers
+rm -f $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post  libs -p /sbin/ldconfig
+%postun        libs -p /sbin/ldconfig
+
 %post
-/sbin/ldconfig
-/sbin/chkconfig --add sensors
-if [ -f /var/lock/subsys/sensors ]; then
-       /etc/rc.d/init.d/sensors restart >&2
-else
-       echo "You have to configure sensors modules."
-       echo "Please edit /etc/sysconfig/sensors file according to your hardware."
-       echo
-       echo "Run \"/etc/rc.d/init.d/sensors start\" to start sensors daemon." >&2
+if [ -f "%{cmodule}" ]; then
+       /sbin/chkconfig --add sensors_modules
+       %service sensors_modules restart "sensors modules"
+       if [ -f "%{sdaemon}" ]; then
+               /sbin/chkconfig --add sensors
+               %service sensors restart "sensors deamon"
+       fi
 fi
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/sensors ]; then
-               /etc/rc.d/init.d/sensors stop >&2
+       if [ -f "%{sdaemon}" ]; then
+               %service sensors stop
+               /sbin/chkconfig --del sensors
        fi
-       /sbin/chkconfig --del sensors
+       %service sensors_modules stop
+       /sbin/chkconfig --del sensors_modules
 fi
 
-%postun        -p /sbin/ldconfig
+%post config-default
+if [ "$1" = 1 ]; then
+cat << EOF
+ *********************************************************************
+ *                                                                   *
+ *  NOTE:                                                            *
+ *  You have to configure sensors to match your motherboard sensors  *
+ *  in  /etc/sensors.conf  and  /etc/sysconfig/sensors_modules. Use  *
+ *  sensors-detect script which  can  help you find proper modules.  *
+ *                                                                   *
+ *********************************************************************
+EOF
+fi
+if [ -f "%{smodule}" ]; then
+       /sbin/chkconfig --add sensors_modules
+       %service sensors_modules restart "sensors modules"
+fi
+if [ -f "%{sdaemon}" ]; then
+       /sbin/chkconfig --add sensors
+       %service sensors restart "sensors daemon"
+fi
 
-%post -n kernel-misc-%{name}
-/sbin/depmod -a
+%preun config-default
+if [ "$1" = "0" ]; then
+       if [ -f "%{sdaemon}" ]; then
+               %service sensors stop
+               /sbin/chkconfig --del sensors
+       fi
+       if [ -f "%{smodule}" ]; then
+               %service sensors_modules stop
+               /sbin/chkconfig --del sensors_modules
+       fi
+fi
 
-%post -n kernel-smp-misc-%{name}
-/sbin/depmod -a
+%post sensord
+if [ -f "%{cmodule}" ]; then
+       /sbin/chkconfig --add sensors
+       %service sensors restart "sensors daemon"
+fi
 
-%postun -n kernel-misc-%{name}
-/sbin/depmod -a
+%preun sensord
+if [ "$1" = "0" ]; then
+       %service sensors stop
+       /sbin/chkconfig --del sensors
+fi
 
-%postun -n kernel-smp-misc-%{name}
-/sbin/depmod -a
+%post fancontrol
+if [ "$1" = 1 ]; then
+       echo "You have to configure fancontrol by running service fancontrol init first."
+fi
+/sbin/chkconfig --add fancontrol
+%service fancontrol restart "fancontrol daemon"
+
+%preun fancontrol
+if [ "$1" = "0" ]; then
+       %service fancontrol stop
+       /sbin/chkconfig --del fancontrol
+fi
 
-%files 
+%files
 %defattr(644,root,root,755)
-%doc *.gz 
-%doc doc/*.gz doc/*.html doc/busses doc/chips
+%doc BACKGROUND BUGS CHANGES README README.thinkpad TODO doc/{busses,chips}
+%doc doc/{FAQ,donations,fan-divisors,progs,temperature-sensors,*html,vid}
+%doc prog/{config,daemon,eepromer/README*,matorb,maxilife}
+%attr(755,root,root) %{_bindir}/ddcmon
+%attr(755,root,root) %{_bindir}/decode-*.pl
 %attr(755,root,root) %{_bindir}/sensors
+%attr(755,root,root) %{_bindir}/sensors.sh
+%attr(755,root,root) %{_sbindir}/eeprom*
+%attr(755,root,root) %{_sbindir}/i2c*
 %attr(755,root,root) %{_sbindir}/sensors-detect
-%attr(754,root,root) %{_sbindir}/sensord
-%attr(754,root,root) /etc/rc.d/init.d/sensors
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sensors.conf
-%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/sensors
-%{_mandir}/man1/*
-%{_mandir}/man5/*
-%{_mandir}/man8/*
+%ifarch %{ix86} %{x8664}
+%attr(755,root,root) %{_sbindir}/isadump
+%attr(755,root,root) %{_sbindir}/isaset
+%{_mandir}/man8/isadump.8*
+%{_mandir}/man8/isaset.8*
+%endif
+%{_mandir}/man1/sensors.1*
+%{_mandir}/man5/sensors.conf.5*
+%{_mandir}/man8/i2c*.8*
+%attr(754,root,root) /etc/rc.d/init.d/sensors_modules
+
+%files config-default
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors.conf
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors_modules
+
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/lib*.so.[0-9]
 
 %files devel
 %defattr(644,root,root,755)
-%doc doc/developers doc/kernel
+%doc doc/{developers,kernel}
 %attr(755,root,root) %{_libdir}/lib*.so
 %{_includedir}/sensors
-%{_includedir}/linux/*
+%{_includedir}/linux/sensors.h
 %{_mandir}/man3/*
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libsensors.a
 
-%files -n kernel-misc-%{name}
+%files sensord
 %defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}/misc/*
+%attr(754,root,root) %{_sbindir}/sensord
+%attr(754,root,root) /etc/rc.d/init.d/sensors
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
+%{_mandir}/man8/sensors-detect.8*
+%{_mandir}/man8/sensord.8*
 
-%files -n kernel-smp-misc-%{name}
+%files fancontrol
 %defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}smp/misc/*
+%attr(755,root,root) %{_sbindir}/fancontrol
+%attr(755,root,root) %{_sbindir}/pwmconfig
+%attr(754,root,root) /etc/rc.d/init.d/fancontrol
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
+%{_mandir}/man8/fancontrol.8*
+%{_mandir}/man8/pwmconfig.8*
This page took 0.888263 seconds and 4 git commands to generate.