- Remove dependency on aaa_base as using %{_sysconfig} instead of
hardcoded /etc shuts up rpmlint. - Use %{buildroot} and %{optflags} insead of env vars. OBS-URL: https://build.opensuse.org/package/show/Base:System/gpm?expand=0&rev=42
This commit is contained in:
parent
536095bbf8
commit
7f427dd9f2
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 22 16:09:10 CET 2016 - pth@suse.de
|
||||
|
||||
- Remove dependency on aaa_base as using %{_sysconfig} instead of
|
||||
hardcoded /etc shuts up rpmlint.
|
||||
- Use %{buildroot} and %{optflags} insead of env vars.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 13 10:54:53 CET 2016 - pth@suse.de
|
||||
|
||||
|
47
gpm.spec
47
gpm.spec
@ -55,7 +55,6 @@ Patch28: gpm-dependencies.patch
|
||||
Patch29: gpm-do_create_symlink.patch
|
||||
#PATCH-FIX-UPSTREAM Copy the current licence text from gpl-2.0+ to gpm.h
|
||||
Patch30: gpm-fix_fsf_addess.patch
|
||||
BuildRequires: aaa_base
|
||||
BuildRequires: bison
|
||||
BuildRequires: libtool
|
||||
BuildRequires: lzma
|
||||
@ -125,53 +124,53 @@ cp %{S:7} COPYING
|
||||
%build
|
||||
# This package failed when testing with -Wl,-as-needed being default.
|
||||
# So we disable it here, if you want to retest, just delete this comment and the line below.
|
||||
#export SUSE_ASNEEDED=0
|
||||
#export SUSE_ASNEEDED=1
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
autoreconf -fi
|
||||
CFLAGS="$RPM_OPT_FLAGS -DQUIET_LIBGPM -D_REENTRANT" \
|
||||
export CFLAGS="%{optflags} -DQUIET_LIBGPM -D_REENTRANT"
|
||||
%configure --disable-static \
|
||||
--sysconfdir=/etc/gpm
|
||||
make CC="%{__cc}" %{?_smp_mflags}
|
||||
%__cc %{optflags} -o inputattach %{SOURCE6}
|
||||
--sysconfdir=%{_sysconfdir}/gpm
|
||||
make CC=gcc %{?_smp_mflags}
|
||||
gcc %{optflags} -o inputattach %{SOURCE6}
|
||||
|
||||
%install
|
||||
make install DESTDIR="%buildroot" ROOT=""
|
||||
#
|
||||
# gpm confings
|
||||
install -d $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/}
|
||||
install -d %{buildroot}%{_sysconfdir}/${file/conf\/gpm-/gpm\/}
|
||||
for file in conf/gpm-* ; do
|
||||
install -d $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/}
|
||||
install -m 644 $file $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/}
|
||||
install -d %{buildroot}%{_sysconfdir}/${file/conf\/gpm-/gpm\/}
|
||||
install -m 644 $file %{buildroot}%{_sysconfdir}/${file/conf\/gpm-/gpm\/}
|
||||
done
|
||||
#
|
||||
# lisp
|
||||
# an updated version is part of emacs now
|
||||
#install -d $RPM_BUILD_ROOT/usr/share/emacs/site-lisp
|
||||
#install contrib/emacs/t-mouse.el* $RPM_BUILD_ROOT/usr/share/emacs/site-lisp
|
||||
#install -d %%{buildroot}/usr/share/emacs/site-lisp
|
||||
#install contrib/emacs/t-mouse.el* %%{buildroot}/usr/share/emacs/site-lisp
|
||||
#
|
||||
# start script
|
||||
install -m 755 -d $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||
install -m 755 -d $RPM_BUILD_ROOT/%{_unitdir}
|
||||
install -m 755 -d $RPM_BUILD_ROOT/usr/sbin
|
||||
install -m 755 -d %{buildroot}/var/adm/fillup-templates
|
||||
install -m 755 -d %{buildroot}/%{_unitdir}
|
||||
install -m 755 -d %{buildroot}/usr/sbin
|
||||
install -m 755 inputattach %{buildroot}%{_sbindir}
|
||||
install -m 644 sysconfig.mouse-%{name} $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||
install -m 644 %{S:2} $RPM_BUILD_ROOT/%{_unitdir}/gpm.service
|
||||
ln -sf /sbin/service $RPM_BUILD_ROOT/usr/sbin/rcgpm
|
||||
install -m 644 sysconfig.mouse-%{name} %{buildroot}/var/adm/fillup-templates
|
||||
install -m 644 %{S:2} %{buildroot}/%{_unitdir}/gpm.service
|
||||
ln -sf %{_sbindir}/service %{buildroot}/usr/sbin/rcgpm
|
||||
# there were two variables with the same value GPM_PROTOCOL and MOUSETYPE
|
||||
# in SuLi 8.2. The MOUSETYPE variable better conforms with with other
|
||||
# variable names MOUSEDEVICE and XMOUSETYPE name scheme, so get rid of
|
||||
# the obsolete GPM_PROTOCOL variable
|
||||
if grep "^GPM_PROTOCOL=" /etc/sysconfig/mouse 1>/dev/null 2>/dev/null ; then
|
||||
if grep "^MOUSETYPE=" /etc/sysconfig/mouse 1>/dev/null 2>/dev/null ; then
|
||||
if grep "^GPM_PROTOCOL=" %{_sysconfdir}/sysconfig/mouse 1>/dev/null 2>/dev/null ; then
|
||||
if grep "^MOUSETYPE=" %{_sysconfdir}/sysconfig/mouse 1>/dev/null 2>/dev/null ; then
|
||||
# comment out the obsolete MOUSETYPE variable
|
||||
perl -pi -e "s|^(MOUSETYPE=.*)$|\#\$1 \# the variable GPM_PROTOCOL was renamed to MOUSETYPE|" /etc/sysconfig/mouse
|
||||
perl -pi -e "s|^(MOUSETYPE=.*)$|\#\$1 \# the variable GPM_PROTOCOL was renamed to MOUSETYPE|" %%{_sysconfdir}/sysconfig/mouse
|
||||
fi
|
||||
# rename GPM_PROTOCOL to MOUSETYPE
|
||||
perl -pi -e "s|^GPM_PROTOCOL=(.*)$|\# the variable GPM_PROTOCOL was renamed to MOUSETYPE\nMOUSETYPE=\$1|" /etc/sysconfig/mouse
|
||||
perl -pi -e "s|^GPM_PROTOCOL=(.*)$|\# the variable GPM_PROTOCOL was renamed to MOUSETYPE\nMOUSETYPE=\$1|" %%{_sysconfdir}/sysconfig/mouse
|
||||
fi
|
||||
|
||||
# Do not package static library
|
||||
rm -fv $RPM_BUILD_ROOT/%{_libdir}/libgpm.a
|
||||
rm -fv %{buildroot}/%{_libdir}/libgpm.a
|
||||
mkdir -p %{buildroot}/run
|
||||
touch %{buildroot}/run/gpm.pid
|
||||
|
||||
@ -202,8 +201,8 @@ touch %{buildroot}/run/gpm.pid
|
||||
%doc doc/Announce doc/FAQ doc/README* doc/changelog
|
||||
%{_infodir}/*
|
||||
%{_mandir}/*/*
|
||||
%dir %config /etc/gpm
|
||||
%config /etc/gpm/*
|
||||
%dir %config %{_sysconfdir}/gpm
|
||||
%config %{_sysconfdir}/gpm/*
|
||||
%{_unitdir}/gpm.service
|
||||
%{_bindir}/*
|
||||
%{_sbindir}/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user