SHA256
1
0
forked from pool/gpm

- 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:
Philipp Thomas 2016-01-22 15:11:30 +00:00 committed by Git OBS Bridge
parent 536095bbf8
commit 7f427dd9f2
2 changed files with 30 additions and 24 deletions

View File

@ -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 Wed Jan 13 10:54:53 CET 2016 - pth@suse.de

View File

@ -55,7 +55,6 @@ Patch28: gpm-dependencies.patch
Patch29: gpm-do_create_symlink.patch Patch29: gpm-do_create_symlink.patch
#PATCH-FIX-UPSTREAM Copy the current licence text from gpl-2.0+ to gpm.h #PATCH-FIX-UPSTREAM Copy the current licence text from gpl-2.0+ to gpm.h
Patch30: gpm-fix_fsf_addess.patch Patch30: gpm-fix_fsf_addess.patch
BuildRequires: aaa_base
BuildRequires: bison BuildRequires: bison
BuildRequires: libtool BuildRequires: libtool
BuildRequires: lzma BuildRequires: lzma
@ -125,53 +124,53 @@ cp %{S:7} COPYING
%build %build
# This package failed when testing with -Wl,-as-needed being default. # 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. # 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 NOCONFIGURE=1 ./autogen.sh
autoreconf -fi autoreconf -fi
CFLAGS="$RPM_OPT_FLAGS -DQUIET_LIBGPM -D_REENTRANT" \ export CFLAGS="%{optflags} -DQUIET_LIBGPM -D_REENTRANT"
%configure --disable-static \ %configure --disable-static \
--sysconfdir=/etc/gpm --sysconfdir=%{_sysconfdir}/gpm
make CC="%{__cc}" %{?_smp_mflags} make CC=gcc %{?_smp_mflags}
%__cc %{optflags} -o inputattach %{SOURCE6} gcc %{optflags} -o inputattach %{SOURCE6}
%install %install
make install DESTDIR="%buildroot" ROOT="" make install DESTDIR="%buildroot" ROOT=""
# #
# gpm confings # 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 for file in conf/gpm-* ; do
install -d $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/} install -d %{buildroot}%{_sysconfdir}/${file/conf\/gpm-/gpm\/}
install -m 644 $file $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/} install -m 644 $file %{buildroot}%{_sysconfdir}/${file/conf\/gpm-/gpm\/}
done done
# #
# lisp # lisp
# an updated version is part of emacs now # an updated version is part of emacs now
#install -d $RPM_BUILD_ROOT/usr/share/emacs/site-lisp #install -d %%{buildroot}/usr/share/emacs/site-lisp
#install contrib/emacs/t-mouse.el* $RPM_BUILD_ROOT/usr/share/emacs/site-lisp #install contrib/emacs/t-mouse.el* %%{buildroot}/usr/share/emacs/site-lisp
# #
# start script # start script
install -m 755 -d $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 755 -d %{buildroot}/var/adm/fillup-templates
install -m 755 -d $RPM_BUILD_ROOT/%{_unitdir} install -m 755 -d %{buildroot}/%{_unitdir}
install -m 755 -d $RPM_BUILD_ROOT/usr/sbin install -m 755 -d %{buildroot}/usr/sbin
install -m 755 inputattach %{buildroot}%{_sbindir} install -m 755 inputattach %{buildroot}%{_sbindir}
install -m 644 sysconfig.mouse-%{name} $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 644 sysconfig.mouse-%{name} %{buildroot}/var/adm/fillup-templates
install -m 644 %{S:2} $RPM_BUILD_ROOT/%{_unitdir}/gpm.service install -m 644 %{S:2} %{buildroot}/%{_unitdir}/gpm.service
ln -sf /sbin/service $RPM_BUILD_ROOT/usr/sbin/rcgpm ln -sf %{_sbindir}/service %{buildroot}/usr/sbin/rcgpm
# there were two variables with the same value GPM_PROTOCOL and MOUSETYPE # there were two variables with the same value GPM_PROTOCOL and MOUSETYPE
# in SuLi 8.2. The MOUSETYPE variable better conforms with with other # in SuLi 8.2. The MOUSETYPE variable better conforms with with other
# variable names MOUSEDEVICE and XMOUSETYPE name scheme, so get rid of # variable names MOUSEDEVICE and XMOUSETYPE name scheme, so get rid of
# the obsolete GPM_PROTOCOL variable # the obsolete GPM_PROTOCOL variable
if grep "^GPM_PROTOCOL=" /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=" /etc/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 # 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 fi
# rename GPM_PROTOCOL to MOUSETYPE # 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 fi
# Do not package static library # Do not package static library
rm -fv $RPM_BUILD_ROOT/%{_libdir}/libgpm.a rm -fv %{buildroot}/%{_libdir}/libgpm.a
mkdir -p %{buildroot}/run mkdir -p %{buildroot}/run
touch %{buildroot}/run/gpm.pid touch %{buildroot}/run/gpm.pid
@ -202,8 +201,8 @@ touch %{buildroot}/run/gpm.pid
%doc doc/Announce doc/FAQ doc/README* doc/changelog %doc doc/Announce doc/FAQ doc/README* doc/changelog
%{_infodir}/* %{_infodir}/*
%{_mandir}/*/* %{_mandir}/*/*
%dir %config /etc/gpm %dir %config %{_sysconfdir}/gpm
%config /etc/gpm/* %config %{_sysconfdir}/gpm/*
%{_unitdir}/gpm.service %{_unitdir}/gpm.service
%{_bindir}/* %{_bindir}/*
%{_sbindir}/* %{_sbindir}/*