summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Vcelak <jvcelak@redhat.com>2011-10-12 16:27:53 +0200
committerJan Vcelak <jvcelak@redhat.com>2011-10-12 16:27:53 +0200
commitac90ffb29b7e558196c4cde634721942dd063cb5 (patch)
tree748925e814a3e4db26751b0d46e020ecd0128206
parentd477133143e00af25fba6dcede2e56f0f7668a38 (diff)
downloadgroff-ac90ffb29b7e558196c4cde634721942dd063cb5.tar.gz
groff-ac90ffb29b7e558196c4cde634721942dd063cb5.tar.xz
groff-ac90ffb29b7e558196c4cde634721942dd063cb5.zip
update: move local configuration from /usr/share/groff to /etc/groff
-rw-r--r--groff-config-etc.patch30
-rw-r--r--groff.spec28
2 files changed, 37 insertions, 21 deletions
diff --git a/groff-config-etc.patch b/groff-config-etc.patch
new file mode 100644
index 0000000..bf299a7
--- /dev/null
+++ b/groff-config-etc.patch
@@ -0,0 +1,30 @@
+Move site-font and site-tmac configuration from /usr/share/groff to /etc/groff
+(Symlinking brought a lot of problems with RPM. This is safer and cleaner.)
+
+Author: Jan Vcelak <jvcelak@redhat.com>
+
+diff -uNPrp a/Makefile.in b/Makefile.in
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -167,7 +167,7 @@ fontdir=$(datasubdir)/font
+ oldfontdir=$(datasubdir)/oldfont
+
+ # `localfontdir' says where local fonts will be installed (as dev*/*).
+-localfontdir=$(dataprogramdir)/site-font
++localfontdir=@sysconfdir@/groff/site-font
+
+ # `legacyfontdir' is for compatibility with non-GNU troff.
+ legacyfontdir=/usr/lib/font
+@@ -179,10 +179,10 @@ fontpath=$(localfontdir)$(RT_SEP)$(fontd
+ tmacdir=$(datasubdir)/tmac
+
+ # `systemtmacdir' says where to install platform-dependent macros.
+-systemtmacdir=$(libprogramdir)/site-tmac
++systemtmacdir=@sysconfdir@/groff/site-tmac
+
+ # `localtmacdir' says where local files will be installed.
+-localtmacdir=$(dataprogramdir)/site-tmac
++localtmacdir=@sysconfdir@/groff/site-tmac
+
+ # `appresdir' says where to install the application resource file for
+ # gxditview.
diff --git a/groff.spec b/groff.spec
index 8cced4d..c547060 100644
--- a/groff.spec
+++ b/groff.spec
@@ -3,7 +3,7 @@
Summary: A document formatting system
Name: groff
Version: 1.21
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPLv3+ and GFDL and BSD and MIT
Group: Applications/Publishing
URL: http://groff.ffii.org
@@ -15,6 +15,7 @@ Patch2: groff-makefile-typo.patch
Patch3: groff-manpages-typos.patch
Patch4: groff-grofferdir-auto.patch
Patch5: groff-grotty-wc-no-sgr.patch
+Patch6: groff-config-etc.patch
Requires: mktemp
Requires: /sbin/install-info
@@ -95,6 +96,7 @@ language and documentation for creating PDF files.
%patch3 -p1 -b .manpages-typos
%patch4 -p1 -b .grofferdir-auto
%patch5 -p1 -b .grotty-wc-no-sgr
+%patch6 -p1 -b .config-etc
for file in NEWS src/devices/grolbp/grolbp.man doc/{groff.info*,webpage.ms} \
contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom} ; do
@@ -143,14 +145,6 @@ rm -f %{buildroot}%{_infodir}/dir
chmod 755 %{buildroot}%{_datadir}/groff/%{version}/groffer/version.sh
chmod 755 %{buildroot}%{_datadir}/groff/%{version}/font/devlj4/generate/special.awk
-# move configuration from /usr/share/groff/site-* to /etc/groff/site-*
-
-mkdir -p %{buildroot}%{_sysconfdir}/groff
-for confdir in site-font site-tmac; do
- mv %{buildroot}%{_datadir}/groff/$confdir %{buildroot}%{_sysconfdir}/groff/$confdir
- ln -s %{_sysconfdir}/groff/$confdir %{buildroot}%{_datadir}/groff/$confdir
-done
-
# remove CreationDate from documentation
pushd %{buildroot}%{_docdir}/%{name}-%{version}
@@ -169,16 +163,6 @@ if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi
-%pretrans base
-if [ $1 = 0 ]; then
- # workaround rpm bug (replacing directory with symlink fails)
- for confdir in site-font site-tmac; do
- [ ! -h %{_datadir}/%{name}/$confdir -a -d %{_datadir}/%{name}/$confdir ] && \
- rm -rf %{_datadir}/%{name}/$confdir
- done
- exit 0
-fi
-
%files
%defattr(-,root,root,-)
# data
@@ -281,8 +265,6 @@ fi
%dir %{_datadir}/%{name}/%{version}/font/
%dir %{_datadir}/%{name}/%{version}/tmac/
%{_datadir}/%{name}/current
-%{_datadir}/%{name}/site-tmac
-%{_datadir}/%{name}/site-font
%{_datadir}/%{name}/%{version}/eign
%{_datadir}/%{name}/%{version}/font/devascii/
%{_datadir}/%{name}/%{version}/font/devlatin1/
@@ -431,6 +413,10 @@ fi
%doc %{_docdir}/%{name}-%{version}/pdf/
%changelog
+* Wed Oct 12 2011 Jan Vcelak <jvcelak@redhat.com> 1.21-7
+- update: move local configuration from /usr/share/groff/site-* to /etc/groff/*
+ (change the paths in the app instead of symlinking to avoid RPM issues)
+
* Tue Oct 11 2011 Jan Vcelak <jvcelak@redhat.com> 1.21-6
- fix build warnings: File listed twice