dos2unix/dos2unix-Makefile.patch

111 lines
4.0 KiB
Diff
Raw Normal View History

Index: Makefile
===================================================================
--- Makefile.orig 2010-01-22 13:33:22.000000000 +0100
+++ Makefile 2010-02-03 10:28:58.112948601 +0100
@@ -25,12 +25,12 @@ exec_prefix = $(prefix)
man_prefix = $(prefix)/share
mandir = $(man_prefix)/man
bindir = $(exec_prefix)/bin
-sharedir = $(prefix)/share
+datadir = $(prefix)/share
-BINDIR = $(DESTDIR)$(bindir)
-DOCDIR = $(DESTDIR)$(sharedir)/doc/$(PACKAGE)-$(DOS2UNIX_VERSION)
-LOCALEDIR = $(DESTDIR)$(sharedir)/locale
-MANDIR = $(DESTDIR)$(mandir)
+BINDIR = $(bindir)
+DOCDIR = $(datadir)/doc/packages/$(PACKAGE)
+LOCALEDIR = $(datadir)/locale
+MANDIR = $(mandir)
MANDIR1 = $(MANDIR)/man1
ifdef ENABLE_NLS
@@ -47,7 +47,7 @@ INSTALL = install
MKDIR = mkdir
ifdef ENABLE_NLS
- NLSDEFS = -DENABLE_NLS -DLOCALEDIR=\"$(sharedir)/locale\" -DPACKAGE=\"$(PACKAGE)\"
+ NLSDEFS = -DENABLE_NLS -DLOCALEDIR=\"$(datadir)/locale\" -DPACKAGE=\"$(PACKAGE)\"
endif
# ......................................................... OS flags ...
@@ -116,7 +116,7 @@ endif
# ............................................................ flags ...
-CFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE
+CFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE $(RPM_OPT_FLAGS)
EXTRA_CFLAGS = -DVER_REVISION=\"$(DOS2UNIX_VERSION)\" \
-DVER_DATE=\"$(DOS2UNIX_DATE)\" \
@@ -176,31 +176,31 @@ $(PACKAGE).ps : dos2unix.1
ps2pdf $< $@
install: all
- $(MKDIR) -p -m 755 $(BINDIR)
- $(INSTALL) -m 755 $(BIN) $(BINDIR)
- $(INSTALL) -m 755 $(MAC2UNIX_BIN) $(BINDIR)
- $(MKDIR) -p -m 755 $(MANDIR1)
- $(INSTALL) -m 644 $(PACKAGE).1 $(MANDIR1)
- $(INSTALL) -m 644 $(MAC2UNIX).1 $(MANDIR1)
+ $(MKDIR) -p -m 755 $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(BIN) $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(MAC2UNIX_BIN) $(DESTDIR)$(BINDIR)
+ $(MKDIR) -p -m 755 $(DESTDIR)$(MANDIR1)
+ $(INSTALL) -m 644 $(PACKAGE).1 $(DESTDIR)$(MANDIR1)
+ $(INSTALL) -m 644 $(MAC2UNIX).1 $(DESTDIR)$(MANDIR1)
ifdef ENABLE_NLS
@echo "-- install-mo"
- $(foreach mofile, $(MOFILES), $(MKDIR) -p -m 755 $(LOCALEDIR)/$(basename $(notdir $(mofile)))/LC_MESSAGES ;)
- $(foreach mofile, $(MOFILES), $(INSTALL) -m 644 $(mofile) $(LOCALEDIR)/$(basename $(notdir $(mofile)))/LC_MESSAGES/$(PACKAGE).mo ;)
+ $(foreach mofile, $(MOFILES), $(MKDIR) -p -m 755 $(DESTDIR)$(LOCALEDIR)/$(basename $(notdir $(mofile)))/LC_MESSAGES ;)
+ $(foreach mofile, $(MOFILES), $(INSTALL) -m 644 $(mofile) $(DESTDIR)$(LOCALEDIR)/$(basename $(notdir $(mofile)))/LC_MESSAGES/$(PACKAGE).mo ;)
endif
@echo "-- install-doc"
- $(MKDIR) -p -m 755 $(DOCDIR)
- $(INSTALL) -m 644 $(INSTALL_OBJS_DOC) $(DOCDIR)
+ $(MKDIR) -p -m 755 $(DESTDIR)$(DOCDIR)
+ $(INSTALL) -m 644 $(INSTALL_OBJS_DOC) $(DESTDIR)$(DOCDIR)
uninstall:
@echo "-- target: uninstall"
- -rm -f $(BINDIR)/$(BIN)
- -rm -f $(BINDIR)/$(MAC2UNIX_BIN)
+ -rm -f $(DESTDIR)$(BINDIR)/$(BIN)
+ -rm -f $(DESTDIR)$(BINDIR)/$(MAC2UNIX_BIN)
ifdef ENABLE_NLS
- $(foreach mofile, $(MOFILES), rm -f $(LOCALEDIR)/$(basename $(notdir $(mofile)))/LC_MESSAGES/$(PACKAGE).mo ;)
+ $(foreach mofile, $(MOFILES), rm -f $(DESTDIR)$(LOCALEDIR)/$(basename $(notdir $(mofile)))/LC_MESSAGES/$(PACKAGE).mo ;)
endif
- -rm -f $(MANDIR)/man1/$(PACKAGE).1
- -rm -f $(MANDIR)/man1/$(MAC2UNIX).1
- -rm -rf $(DOCDIR)
+ -rm -f $(DESTDIR)$(MANDIR)/man1/$(PACKAGE).1
+ -rm -f $(DESTDIR)$(MANDIR)/man1/$(MAC2UNIX).1
+ -rm -rf $(DESTDIR)$(DOCDIR)
clean:
rm -f *.o
@@ -229,6 +229,7 @@ endif
VERSIONSUFFIX = -bin
ZIPFILE = $(PACKAGE)-$(DOS2UNIX_VERSION)$(VERSIONSUFFIX).zip
TGZFILE = $(PACKAGE)-$(DOS2UNIX_VERSION)$(VERSIONSUFFIX).tar.gz
+TBZFILE = $(PACKAGE)-$(DOS2UNIX_VERSION)$(VERSIONSUFFIX).tar.bz2
dist-zip:
rm -f $(prefix)/$(ZIPFILE)
@@ -241,7 +242,12 @@ dist-tgz:
cd $(prefix) ; tar cvzf $(TGZFILE) $(ZIPOBJ)
mv $(prefix)/$(TGZFILE) ..
-dist: dist-tgz
+dist-tbz:
+ cd $(prefix) ; dos2unix share/doc/$(PACKAGE)-$(DOS2UNIX_VERSION)/*.txt share/man/man1/$(PACKAGE).1 share/man/man1/$(MAC2UNIX).1
+ cd $(prefix) ; tar cvjf $(TBZFILE) $(ZIPOBJ)
+ mv $(prefix)/$(TBZFILE) ..
+
+dist: dist-tbz
strip:
strip $(BIN)