Projects
mass
turbina-core-dimm
turbina-core-dimm.spec
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File turbina-core-dimm.spec of Package turbina-core-dimm
# # spec file for package turbina-core-dimm # # Copyright (c) 2012 Matwey V. Kornilov. # # 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. %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} # Emulate SUSE stuff for RedHat %{!?fillup_and_insserv:%{expand: %%global fillup_and_insserv() /sbin/chkconfig --add %{1}}} %{!?stop_on_removal:%{expand: %%global stop_on_removal() \ if [ $1 = 0 ] ; then \ /sbin/service %{1} stop >/dev/null 2>&1 \ /sbin/chkconfig --del %{1} \ fi}} %{!?restart_on_update:%{expand: %%global restart_on_update() \ if [ "$1" -ge "1" ] ; then \ /sbin/service %{1} condrestart >/dev/null 2>&1 || : \ fi}} %{!?insserv_cleanup:%{expand: %%global insserv_cleanup() %%nil }} %endif # Support both shadow-utils and pwdutils %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?suse_version} > 1220 %define usermod_A /usr/sbin/usermod -a -G %else %define usermod_A /usr/sbin/usermod -A %endif %{!?_initddir:%{expand: %%global _initddir %_initrddir}} %define tarname dimm_tool Summary: DIMM measure daemon License: GPL-2.0+ Group: Productivity/Scientific/Astronomy Name: turbina-core-dimm Version: 2.51 Release: 0 Url: http://curl.sai.msu.ru/hg/dimm_tool Source: %{tarname}-%{version}.tar.bz2 Source1: defnames.h Source2: rcdimm Source3: rcdimm.redhat Source4: %{name}.service Requires(pre): turbina-core /usr/bin/getent /usr/sbin/usermod %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} # RedHat Requires(post): chkconfig Requires(preun): chkconfig initscripts Requires(postun): initscripts %else # SUSE Requires(post): %insserv_prereq %fillup_prereq Requires(preun): %insserv_prereq Requires(postun): %insserv_prereq %if 0%{?suse_version} >= 1330 Requires(pre): group(video) %endif %endif Requires: turbina-core BuildRequires: boost-devel BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libdc1394-devel BuildRequires: make %if 0%{?suse_version} > 1230 BuildRequires: systemd-rpm-macros # Required by turbina-core-dimm.service Requires: /usr/bin/dc1394_reset_bus %{?systemd_requires} %define have_systemd 1 %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Authors: -------- Victor G. Kornilov <victor@sai.msu.ru> %package -n preat Summary: DIMM data processing tool Group: Productivity/Scientific/Astronomy %description -n preat Authors: -------- Victor G. Kornilov <victor@sai.msu.ru> %prep %setup -n %{tarname}-%{version} %build export CXXFLAGS=$RPM_OPT_FLAGS export CPPFLAGS=$RPM_OPT_FLAGS cp %{S:1} . %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} # RedHat cp %{S:3} rcdimm %else # SUSE cp %{S:2} rcdimm %endif make prefix=/usr %install make prefix=/usr install DESTDIR=%{buildroot} mkdir -p %{buildroot}/var/lib/turbina/dimm mkdir -p %{buildroot}/var/lib/turbina/dimm/images mkdir -p %{buildroot}/var/log/turbina/dimm mkdir -p %{buildroot}/etc/turbina install etc/turdimm.cfg %{buildroot}/etc/turbina/dimm.cfg %if 0%{?have_systemd} install -D -m 0644 %{S:4} %{buildroot}%{_unitdir}/%{name}.service %else install -D -m 0755 rcdimm %{buildroot}%{_initddir}/turbina-core-dimm %endif %if 0%{?suse_version} mkdir -p %{buildroot}%{_sbindir} %if 0%{?have_systemd} ln -s /sbin/service %{buildroot}%{_sbindir}/rcturbina-core-dimm %else ln -s %{_initddir}/turbina-core-dimm %{buildroot}%{_sbindir}/rcturbina-core-dimm %endif %endif mkdir -p %{buildroot}%{_datadir}/preat/crv cp -rp ./data/data/*.crv %{buildroot}%{_datadir}/preat/crv mkdir -p %{buildroot}%{_datadir}/preat/spectra cp -rp ./data/spectra/*.sp %{buildroot}%{_datadir}/preat/spectra %clean rm -rf %{buildroot} %pre getent passwd turbina >/dev/null && %usermod_A video turbina %if 0%{?have_systemd} %service_add_pre turbina-core-dimm.service %endif %post %if 0%{?have_systemd} %service_add_post turbina-core-dimm.service %else %{fillup_and_insserv turbina-core-dimm} %endif %preun %if 0%{?have_systemd} %service_del_preun turbina-core-dimm.service %else %stop_on_removal turbina-core-dimm %endif %postun %if 0%{?have_systemd} %service_del_postun turbina-core-dimm.service %else %restart_on_update turbina-core-dimm %insserv_cleanup %endif %files %defattr(-,root,root,0755) %if 0%{?have_systemd} %{_unitdir}/turbina-core-dimm.service %else %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} # RedHat %{_initddir}/turbina-core-dimm %else # SUSE %config %{_initddir}/turbina-core-dimm %endif %endif %if 0%{?suse_version} %attr(0755,root,root) %{_sbindir}/rcturbina-core-dimm %endif %attr(0755,root,root) %{_bindir}/dimm %attr(0644,root,root) %verify(not md5 size mtime) %config(noreplace) /etc/turbina/dimm.cfg %dir %attr(0755,turbina,turbina) /var/lib/turbina/dimm %dir %attr(0755,turbina,turbina) /var/lib/turbina/dimm/images %dir %attr(0755,turbina,turbina) /var/log/turbina/dimm %files -n preat %defattr(-,root,root,0755) %attr(755,root,root) %{_bindir}/preat %dir %{_datadir}/preat %dir %{_datadir}/preat/crv %dir %{_datadir}/preat/spectra %attr(644,root,root) %{_datadir}/preat/crv/*.crv %attr(644,root,root) %{_datadir}/preat/spectra/*.sp %changelog
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.