File unix2dos.spec of Package unix2dos

#
# spec file for package unix2dos (Version 2.2)
#
# 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:           unix2dos
Summary:        UNIX to DOS text file format converter
Version:        2.2
Release:        362
License:        BSD 3-clause (or similar)
Group:          Productivity/Text/Convertors
Source:         unix2dos-2.2.src.tar.gz
Patch0:         unix2dos-mkstemp.patch
Patch1:         unix2dos-2.2-segfault.patch
Patch2:         unix2dos-2.2-manpage.patch
Patch3:         unix2dos-2.2-file_mode.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%prep
%setup -q -c
%patch0 -p1 -b .sec
%patch1 -p1 -b .segf
%patch2 -p1 -b .man
%patch3 -b .fmode
perl -pi -e "s,^#endif.*,#endif,g;s,^#else.*,#else,g" *.[ch]

%description
Converts plain text files from UNIX format to DOS format.



Authors:
--------
    Benjamin Lin blin @ socs.uts.edu.au

%build
gcc %optflags -ounix2dos unix2dos.c

%install
mkdir -p %{buildroot}{%{_bindir},%{_mandir}/man1}
install -m755 unix2dos %{buildroot}%{_bindir}
install -m444 unix2dos.1 %{buildroot}%{_mandir}/man1

%clean
rm -rf %buildroot

%files
%defattr(-,root,root,0755)
%doc COPYRIGHT
%{_bindir}/unix2dos
%{_mandir}/*/*

%changelog
openSUSE Build Service is sponsored by