Summary: UNIX to DOS text file format converter Name: unix2dos Version: 2.2 Release: 1 License: BSD Group: Applications/Text Source0: %{name}-%{version}.src.tar.gz Patch0: %{name}-%{version}-aix.patch Patch1: %{name}-mkstemp.patch Patch2: %{name}-%{version}-segfault.patch Patch3: %{name}-%{version}-manpage.patch Patch4: %{name}-%{version}-mode.patch Patch5: %{name}-%{version}-tmppath.patch Patch6: %{name}-preserve-file-modes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: patch %description A utility that converts plain text files in UNIX format to DOS format. %prep export PATH=/opt/freeware/bin:$PATH %setup -q -c %patch0 %patch1 -p1 -b .sec %patch2 -p1 -b .segf %patch3 -p1 -b .man %patch4 -p1 -b .mode %patch5 -p1 -b .tmppath %patch6 -p1 -b .preserve-file-modes perl -pi -e "s/^#endif.*/#endif/g;s/^#else.*/#else/g" *.[ch] %build cc -o unix2dos unix2dos.c %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} cp unix2dos ${RPM_BUILD_ROOT}%{_bindir} chmod 0755 ${RPM_BUILD_ROOT}%{_bindir}/* /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 cp unix2dos.1 ${RPM_BUILD_ROOT}%{_mandir}/man1 chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man1/* cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc COPYRIGHT %{_bindir}/* %{_mandir}/man1/* /usr/bin/* %changelog * Fri Sep 26 2008 Michael Perzl - 2.2-1 - first version for AIX V5.1 and higher