aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish.spec.in
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-08-01 23:57:09 +1000
committerGravatar axel <axel@liljencrantz.se>2006-08-01 23:57:09 +1000
commit6b1570b745c71c59c4ee0fa07482776a2f6b890a (patch)
tree56be2c3680083adc78522d9545967ed86c44efd6 /fish.spec.in
parentdc3634dc9410cfdd4c3e4a98e807b0f03d61388b (diff)
Tweak spec file as per suggestions from Michael Schwendt
darcs-hash:20060801135709-ac50b-07c6191b7464ba90dd64c78ae18df8b59e8e18ad.gz
Diffstat (limited to 'fish.spec.in')
-rw-r--r--fish.spec.in34
1 files changed, 31 insertions, 3 deletions
diff --git a/fish.spec.in b/fish.spec.in
index a36c384e..2c4cc0cb 100644
--- a/fish.spec.in
+++ b/fish.spec.in
@@ -1,5 +1,3 @@
-%define xinclude %( if test -d /usr/X11R6/include; then echo /usr/X11R6/include; else echo /usr/include; fi )
-
Summary: A friendly interactive shell
Name: @PACKAGE_NAME@
@@ -14,9 +12,37 @@ Source0: http://roo.no-ip.org/%{name}/files/%{version}/%{name}-%{
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ncurses-devel gettext groff
+
+
+# Locate correct build-dependencies for providing X headers
+%if "%fedora" >= "5"
+
+ # Modern Fedora version, has modular X.org
+BuildRequires: xorg-x11-proto-devel libX11-devel libXt-devel
+
+%else
+ %if "%fedora" >= "3"
+
+ # Semi-old Fedora version, has non-modular X.org
+BuildRequires: xorg-x11-devel
+
+ %else
+ %if 0%{?fedora}
+
+ # Ancient Fedora version, has XFree86
+BuildRequires: XFree86-devel
+
+ %else
+
+ # This is not a Fedora system, try guessing BuildRequires by
+ # looking at the directory structure
+ %define xinclude /usr%(if [ -d /usr/X11R6/include ]; then echo /X11R6; fi)/include
BuildRequires: %{xinclude}/X11/StringDefs.h, %{xinclude}/X11/Xlib.h
-BuildRequires: %{xinclude}/X11/Intrinsic.h, %{xinclude}/X11/Xatom.h
+BuildRequires: %{xinclude}/X11/Intrinsic.h, %{xinclude}/X11/Xatom.h
+ %endif
+ %endif
+%endif
%description
@@ -53,6 +79,7 @@ rm -rf $RPM_BUILD_ROOT
%post
+# Add fish to the list of allowed shells in /etc/shells
if ! grep %_bindir/fish %_sysconfdir/shells >/dev/null; then
echo %_bindir/fish >>%_sysconfdir/shells
fi
@@ -61,6 +88,7 @@ fi
%postun
+# Remove fish from the list of allowed shells in /etc/shells
if [ "$1" = 0 ]; then
grep -v %_bindir/fish %_sysconfdir/shells >%_sysconfdir/fish.tmp
mv %_sysconfdir/fish.tmp %_sysconfdir/shells