Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37827357
en ru br
Репозитории ALT

Группа :: Офис
Пакет: docx2txt

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: docx2txt-1.2-Allow-specifying-the-root-of-the-installation.patch
Скачать


From 0deab618a0beefaf94f4e5c10e2648bed8389e95 Mon Sep 17 00:00:00 2001
From: Mathieu Bridon <bochecha@fedoraproject.org>
Date: Wed, 25 Sep 2013 14:19:29 +0800
Subject: [PATCH] Allow specifying the root of the installation
This is necessary to install in an alternative root, for example when
building an RPM package.
We can't just get away with specifying BINDIR and CONFIGDIR, because
then CONFIGDIR gets set inside the docx2txt.pl script.
---
 Makefile |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index 7394f70..4a5aa87 100644
--- a/Makefile
+++ b/Makefile
@@ -23,18 +23,18 @@ CONFIGFILE = docx2txt.config
 install: installbin installconfig
 
 installbin: $(BINFILES)
-	@echo "Installing script files [$(BINFILES)] in \"$(BINDIR)\" .."
-	@[ -d "$(BINDIR)" ] || mkdir -p "$(BINDIR)"
-	$(INSTALL) -m 755 $^ "$(BINDIR)"
+	@echo "Installing script files [$(BINFILES)] in \"$(DESTDIR)$(BINDIR)\" .."
+	@[ -d "$(DESTDIR)$(BINDIR)" ] || mkdir -p "$(DESTDIR)$(BINDIR)"
+	$(INSTALL) -m 755 $^ "$(DESTDIR)$(BINDIR)"
 ifneq ($(PERL),)
-	@echo "Setting systemConfigDir to [$(CONFIGDIR)] in \"$(BINDIR)/docx2txt.pl\" .."
-	$(PERL) -pi -e "s%\"/etc\";%\"$(CONFIGDIR)\";%" "$(BINDIR)/docx2txt.pl"\
-	&& rm -f "$(BINDIR)/docx2txt.pl.bak"
+	@echo "Setting systemConfigDir to [$(CONFIGDIR)] in \"$(DESTDIR)$(BINDIR)/docx2txt.pl\" .."
+	$(PERL) -pi -e "s%\"/etc\";%\"$(CONFIGDIR)\";%" "$(DESTDIR)$(BINDIR)/docx2txt.pl"\
+	&& rm -f "$(DESTDIR)$(BINDIR)/docx2txt.pl.bak"
 else
-	@echo "*** Set systemConfigDir to \"$(CONFIGDIR)\" in \"$(BINDIR)/docx2txt.pl\"."
+	@echo "*** Set systemConfigDir to \"$(CONFIGDIR)\" in \"$(DESTDIR)$(BINDIR)/docx2txt.pl\"."
 endif
 
 installconfig: $(CONFIGFILE)
-	@echo "Installing config file [$(CONFIGFILE)] in \"$(CONFIGDIR)\" .."
-	@[ -d "$(CONFIGDIR)" ] || mkdir -p "$(CONFIGDIR)"
-	$(INSTALL) -m 755 $^ "$(CONFIGDIR)"
+	@echo "Installing config file [$(CONFIGFILE)] in \"$(DESTDIR)$(CONFIGDIR)\" .."
+	@[ -d "$(DESTDIR)$(CONFIGDIR)" ] || mkdir -p "$(DESTDIR)$(CONFIGDIR)"
+	$(INSTALL) -m 755 $^ "$(DESTDIR)$(CONFIGDIR)"
-- 
1.7.1
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin