File mfsm.spec of Package mfsm
#
# spec file for package mfsm (Version 1.4)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: mfsm
BuildRequires: openmotif openmotif-devel update-desktop-files
License: PERMISSIVE-OSI-COMPLIANT
Group: System/Monitoring
AutoReqProv: on
Url: http://members.tripod.com/SDHEngSoft/mfsm.html
Version: 1.4
Release: 467
Summary: X Window System Based du
Source: %{name}-%{version}.tar.bz2
Source1: %{name}.desktop
Patch: %{name}-%{version}.patch
Patch1: %{name}-%{version}-file-close.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
X Window Motif utility that monitors free space and user quotas of file
systems.
Authors:
--------
Shane D. Hill <Shane.Hill@dsto.defence.gov.au>
%if "%(xft-config --prefix)" == "/usr"
%define _xorg7libs %_lib
%define _xorg7libs32 lib
%define _xorg7bin bin
%define _xorg7_mandir %_mandir
%define _xorg7pixmaps include
%define _xorg7libshare share
%define _xorg7_xkb /usr/share/X11/xkb
%define _xorg7_termcap /usr/lib/X11/etc
%define _xorg7_serverincl /usr/include/xorg
%define _xorg7_fonts /usr/share/fonts
%define _xorg7_prefix /usr
%else
%define _xorg7libs X11R6/%_lib
%define _xorg7libs32 X11R6/lib
%define _xorg7bin X11R6/bin
%define _xorg7_mandir /usr/X11R6/man
%define _xorg7pixmaps X11R6/include
%define _xorg7libshare X11R6/lib/
%define _xorg7_xkb /etc/X11/xkb
%define _xorg7_termcap /usr/X11R6/lib/X11/etc
%define _xorg7_serverincl /usr/X11R6/lib/Server/include
%define _xorg7_fonts /usr/X11R6/lib/X11/fonts
%define _xorg7_prefix /usr/X11R6
%endif
%prep
%setup -q -n %{name}-%{version}
%patch
%patch1
%build
xmkmf -a
test -x /usr/sbin/switch_motif_linking && \
/usr/sbin/switch_motif_linking dynamic
make CCOPTIONS="$RPM_OPT_FLAGS" LDFLAGS="-L/usr/%{_xorg7libs}"
#mv mfsm mfsm.SuSE-dynamic
#test -x /usr/sbin/switch_motif_linking && \
# /usr/sbin/switch_motif_linking static
#make LDFLAGS="-L/usr/X11R6/lib"
#mv mfsm mfsm.SuSE-static
#make
%install
mkdir -p $RPM_BUILD_ROOT/usr/%{_xorg7bin}
mkdir -p $RPM_BUILD_ROOT/%{_xorg7_mandir}/man1
install -m 0755 mfsm $RPM_BUILD_ROOT/usr/%{_xorg7bin}
install -m 0644 mfsm._man $RPM_BUILD_ROOT/%{_xorg7_mandir}/man1/mfsm.1x
#install -m 0755 mfsm.SuSE-static /usr/%{_xorg7bin}
#ln -s /usr/%{_xorg7bin}/mfsm.SuSE-static /usr/%{_xorg7bin}/mfsm
%suse_update_desktop_file -i %name System Filesystem
%files
%defattr(-,root,root)
/usr/share/applications/%name.desktop
/usr/%{_xorg7bin}/mfsm
#/usr/%{_xorg7bin}/mfsm.SuSE-dynamic
#/usr/%{_xorg7bin}/mfsm.SuSE-static
%doc %{_xorg7_mandir}/man1/mfsm.1x.gz
%doc README THANKS TODO FIXES
%changelog