LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File qbiff.spec of Package qbiff (Project home:sax2)

# spec file for package qbiff (Version 7.2)
# Copyright (c) 2004 SUSE LINUX AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
  %define _fillupdir /var/adm/fillup-templates

Name: qbiff
BuildRequires:  fdupes cmake openssl
BuildRequires:  libqt4 libqt4-devel libqt4-x11
BuildRequires:  openssl-devel
BuildRequires:  libkde4-devel
BuildRequires:  cmake
%if 0%{?suse_version} > 1140
BuildRequires:  systemd
Summary:      Yet another biff implementation SSL server/client based
Version:      7.2
Release:      16
Group:        System/X11/Utilities
License:      Other License(s), see package, GPL
Source:       qbiff.tar.bz2
Source1:      qbiff.sysconfig
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Requires:     vim

This package contains the qbiff application, which is a simple
button bar notifiying about new mail and allows to run an application
of your choice to read the mail

%package -n qbiffd
Requires(pre): %fillup_prereq
%if 0%{?suse_version} >= 1210
BuildRequires:  systemd-rpm-macros
Requires(pre):  %insserv_prereq
Summary:  Server part of qbiff
Group:    System/X11/Utilities

%description -n qbiffd
This package contains the qbiff server, which takes control over the
status of the maildir formatted mails on the machine the server
runs on.

    Marcus Schaefer <ms@suse.de>
# Preparation...
%setup -n qbiff

test -e /.buildenv && . /.buildenv
# build sources
	mkdir build && cd build && \
	cmake ../ -DCMAKE_INSTALL_PREFIX="/usr"
make -C build all

# install sources
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/usr/share/qbiff
mkdir -p $RPM_BUILD_ROOT/usr/share/qbiff/cert-server
mkdir -p $RPM_BUILD_ROOT/usr/share/qbiff/cert-client
mkdir -p $RPM_BUILD_ROOT/usr/share/qbiff/pixmaps

make -C build DESTDIR="%{buildroot}" install

install -m 755 $RPM_BUILD_ROOT/usr/bin/qbiff  $RPM_BUILD_ROOT/usr/bin/qbiffd
install -m 755 qbiff-client         $RPM_BUILD_ROOT/usr/bin
install -m 755 qbiff-server         $RPM_BUILD_ROOT/usr/bin
install -m 755 readmail             $RPM_BUILD_ROOT/usr/share/qbiff
install -m 755 readmail.private     $RPM_BUILD_ROOT/usr/share/qbiff
install -m 644 readmail.txt         $RPM_BUILD_ROOT/usr/share/qbiff
install -m 644 readmail.private.txt $RPM_BUILD_ROOT/usr/share/qbiff

install -m 644 pixmaps/newmail.png  $RPM_BUILD_ROOT/usr/share/qbiff/pixmaps
install -m 644 pixmaps/nomail.png   $RPM_BUILD_ROOT/usr/share/qbiff/pixmaps
install -m 644 pixmaps/private.png  $RPM_BUILD_ROOT/usr/share/qbiff/pixmaps
install -m 644 pixmaps/public.png   $RPM_BUILD_ROOT/usr/share/qbiff/pixmaps
install -m 644 pixmaps/shape.xpm    $RPM_BUILD_ROOT/usr/share/qbiff/pixmaps

%if %{suse_version} <= 1140
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 755 sysvinit/qbiffd $RPM_BUILD_ROOT/etc/init.d
rm -f %{buildroot}%{_sbindir}/rcqbiffd
%{__ln_s} ../../etc/init.d/qbiffd %{buildroot}%{_sbindir}/rcqbiffd
mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system
install -m 755 systemd/qbiffd.service $RPM_BUILD_ROOT/usr/lib/systemd/system

%{__install} -D -m 0644 %{S:1} %{buildroot}%{_fillupdir}/sysconfig.qbiffd

install -m 644 cert-server/rootcert.pem \
install -m 644 cert-server/dh1024.pem \
install -m 644 cert-server/dh512.pem \
install -m 644 cert-server/server.pem \

install -m 644 cert-client/client.pem \
install -m 644 cert-client/rootcert.pem \

%fdupes $RPM_BUILD_ROOT/usr/share/qbiff

%{__rm} -rf %{buildroot}

%preun -n qbiffd
%{stop_on_removal qbiffd}

%post -n qbiffd
%if 0%{?suse_version} >= 1210
%service_add_post qbiffd.service
%{fillup_only -n qbiffd}

%postun -n qbiffd
%if 0%{?suse_version} >= 1210
%service_del_postun qbiffd.service
%{restart_on_update qbiffd}

# qbiff files...      
%dir /usr/share/qbiff
%config /usr/share/qbiff/readmail
%config /usr/share/qbiff/readmail.private

# qbiff server files...      
%files -n qbiffd
%dir /usr/share/qbiff
%if %{suse_version} <= 1140
%attr(0755,root,root) %{_initddir}/qbiffd