- Adjust license tag (bug #225706).
- Fix missing prototype (bug #225706). - Install copy as symbolic links (bug #225706).
This commit is contained in:
parent
e8de4261a8
commit
53ca4e2be5
15
dos2unix-missing-proto.patch
Normal file
15
dos2unix-missing-proto.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff -up dos2unix-3.1/dos2unix.c.missing-proto dos2unix-3.1/dos2unix.c
|
||||||
|
--- dos2unix-3.1/dos2unix.c.missing-proto 2008-04-14 17:11:58.000000000 +0100
|
||||||
|
+++ dos2unix-3.1/dos2unix.c 2008-04-14 17:12:42.000000000 +0100
|
||||||
|
@@ -75,6 +75,11 @@ static int macmode = 0;
|
||||||
|
#include <string.h>
|
||||||
|
#include <utime.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
+#if defined(__MSDOS__) || defined(__WIN32__) || defined(_WIN32)
|
||||||
|
+# include <io.h>
|
||||||
|
+#else
|
||||||
|
+# include <unistd.h>
|
||||||
|
+#endif
|
||||||
|
#include "dos2unix.h"
|
||||||
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
Summary: Text file format converter
|
Summary: Text file format converter
|
||||||
Name: dos2unix
|
Name: dos2unix
|
||||||
Version: 3.1
|
Version: 3.1
|
||||||
Release: 31%{?dist}
|
Release: 32%{?dist}
|
||||||
Group: Applications/Text
|
Group: Applications/Text
|
||||||
License: Freely distributable
|
License: BSD
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
Patch0: %{name}-%{version}.patch
|
Patch0: %{name}-%{version}.patch
|
||||||
Patch1: dos2unix-3.1-segfault.patch
|
Patch1: dos2unix-3.1-segfault.patch
|
||||||
@ -12,6 +12,7 @@ Patch3: dos2unix-3.1-manpage-update-57507.patch
|
|||||||
Patch4: dos2unix-3.1-preserve-file-modes.patch
|
Patch4: dos2unix-3.1-preserve-file-modes.patch
|
||||||
Patch5: dos2unix-3.1-tmppath.patch
|
Patch5: dos2unix-3.1-tmppath.patch
|
||||||
Patch6: dos2unix-c-missing-arg.patch
|
Patch6: dos2unix-c-missing-arg.patch
|
||||||
|
Patch7: dos2unix-missing-proto.patch
|
||||||
|
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
@ -27,6 +28,7 @@ Dos2unix converts DOS or MAC text files to UNIX format.
|
|||||||
%patch4 -p1 -b .preserve-file-modes
|
%patch4 -p1 -b .preserve-file-modes
|
||||||
%patch5 -p1 -b .tmppath
|
%patch5 -p1 -b .tmppath
|
||||||
%patch6 -p1 -b .c-missing-arg
|
%patch6 -p1 -b .c-missing-arg
|
||||||
|
%patch7 -p1 -b .missing-proto
|
||||||
|
|
||||||
for I in *.[ch]; do
|
for I in *.[ch]; do
|
||||||
sed -e 's,#endif.*,#endif,g' -e 's,#else.*,#else,g' $I > $I.new
|
sed -e 's,#endif.*,#endif,g' -e 's,#else.*,#else,g' $I > $I.new
|
||||||
@ -37,16 +39,15 @@ done
|
|||||||
make clean
|
make clean
|
||||||
make CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE $(getconf LFS_CFLAGS)" \
|
make CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE $(getconf LFS_CFLAGS)" \
|
||||||
%{?_smp_mflags}
|
%{?_smp_mflags}
|
||||||
make link
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
|
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
|
||||||
install -p -m755 dos2unix $RPM_BUILD_ROOT%{_bindir}
|
install -p -m755 dos2unix $RPM_BUILD_ROOT%{_bindir}
|
||||||
install -p -m755 mac2unix $RPM_BUILD_ROOT%{_bindir}
|
ln -s dos2unix $RPM_BUILD_ROOT%{_bindir}/mac2unix
|
||||||
install -p -m444 dos2unix.1 $RPM_BUILD_ROOT%{_mandir}/man1
|
install -p -m644 dos2unix.1 $RPM_BUILD_ROOT%{_mandir}/man1
|
||||||
install -p -m444 mac2unix.1 $RPM_BUILD_ROOT%{_mandir}/man1
|
ln -s dos2unix.1 $RPM_BUILD_ROOT%{_mandir}/man1/mac2unix.1
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,0755)
|
%defattr(-,root,root,0755)
|
||||||
@ -59,6 +60,11 @@ install -p -m444 mac2unix.1 $RPM_BUILD_ROOT%{_mandir}/man1
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 14 2008 Tim Waugh <twaugh@redhat.com> 3.1-32
|
||||||
|
- Adjust license tag (bug #225706).
|
||||||
|
- Fix missing prototype (bug #225706).
|
||||||
|
- Install copy as symbolic links (bug #225706).
|
||||||
|
|
||||||
* Wed Feb 13 2008 Tim Waugh <twaugh@redhat.com> 3.1-31
|
* Wed Feb 13 2008 Tim Waugh <twaugh@redhat.com> 3.1-31
|
||||||
- Rebuild for GCC 4.3.
|
- Rebuild for GCC 4.3.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user