From 1c6ef5d8beafc5ec9c9dbd965b62b760a45878d46f4141102157145c927a411b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 30 Jan 2015 12:43:05 +0000 Subject: [PATCH] Accepting request 281409 from home:scarabeus_iv:branches:shells - Cleanup with spec-cleaner to order header data - Use %lang_package macro to remove redundant stuff - Drop unused patch tcsh-6.15.00-blanks.dif - Run make with more threads - Move the commented check to check section to silence rpmlint OBS-URL: https://build.opensuse.org/request/show/281409 OBS-URL: https://build.opensuse.org/package/show/shells/tcsh?expand=0&rev=50 --- tcsh-6.15.00-blanks.dif | 23 -------- tcsh.changes | 9 +++ tcsh.spec | 118 ++++++++++++++++------------------------ 3 files changed, 57 insertions(+), 93 deletions(-) delete mode 100644 tcsh-6.15.00-blanks.dif diff --git a/tcsh-6.15.00-blanks.dif b/tcsh-6.15.00-blanks.dif deleted file mode 100644 index 9e8db31..0000000 --- a/tcsh-6.15.00-blanks.dif +++ /dev/null @@ -1,23 +0,0 @@ ---- sh.misc.c -+++ sh.misc.c 2008-10-06 13:58:56.389867280 +0000 -@@ -185,8 +185,18 @@ saveblk(Char **v) - - onewv = newv = xcalloc(blklen(v) + 1, sizeof(Char **)); - -- while (*v) -- *newv++ = Strsave(*v++); -+ while (*v) { -+ Char *__restrict__ l = *v; -+ do { -+ int c; -+ if (!l || ((c = TRM(*l)) != ' ' && c != '\t' && c != '\n')) -+ break; /* strip blanks */ -+ l++; -+ } while (*l); -+ *newv++ = Strsave(l); -+ v++; -+ } -+ - return (onewv); - } - diff --git a/tcsh.changes b/tcsh.changes index 346fbe5..ebb42d8 100644 --- a/tcsh.changes +++ b/tcsh.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Jan 15 14:18:41 UTC 2015 - tchvatal@suse.com + +- Cleanup with spec-cleaner to order header data +- Use %lang_package macro to remove redundant stuff +- Drop unused patch tcsh-6.15.00-blanks.dif +- Run make with more threads +- Move the commented check to check section to silence rpmlint + ------------------------------------------------------------------- Tue Jan 13 17:03:12 UTC 2015 - werner@suse.de diff --git a/tcsh.spec b/tcsh.spec index 3cd43a2..f967b54 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -17,25 +17,18 @@ Name: tcsh -BuildRequires: ncurses-devel -Url: http://www.tcsh.org/ -Requires: gawk -Requires: textutils -%if %suse_version > 1020 -Recommends: tcsh-lang = 6.18.00 -%endif Version: 6.18.01 Release: 0 Summary: The C SHell License: BSD-3-Clause Group: System/Shells +Url: http://www.tcsh.org/ Source: ftp.astron.com:/pub/tcsh/tcsh-6.18.01.tar.gz Source2: bindkey.tcsh Source3: complete.tcsh -Patch: tcsh-6.18.00.dif +Patch0: tcsh-6.18.00.dif Patch1: tcsh-6.15.00-pipe.dif Patch2: tcsh-6.16.00-norm-cmd.dif -Patch3: tcsh-6.15.00-blanks.dif Patch4: tcsh-6.17.03-colorls.dif Patch5: tcsh-6.17.06-dspmbyte.dif Patch6: tcsh-6.17.10-catalogs.dif @@ -44,6 +37,10 @@ Patch8: tcsh-6.18.01-metakey.patch # PATCH-FIX-SUSE add history file locking (bsc#901076) Patch9: tcsh-6.18.00-history-file-locking.patch Patch10: tcsh-6.18.01-history-merge.dif +BuildRequires: ncurses-devel +Requires: gawk +Requires: textutils +Recommends: tcsh-lang = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -53,36 +50,20 @@ interactive login shell and a shell script command processor. It includes a command-line editor, programmable word completion, spelling correction, a history mechanism, job control, and a C-like syntax. - - -Authors: --------- - Christos Zoulas - Scott Krotz - -%package -n tcsh-lang -Summary: Languages for package tcsh -Group: System/Localization -Provides: tcsh-lang = %{version} -Requires: tcsh = %{version} - -%description -n tcsh-lang -Provides translations to the package tcsh +%lang_package %prep -%setup -%patch1 -p0 -b .pipe -%patch2 -p0 -b .normcmd -### disabled for know, should work on os11.1 without -### %patch3 -p0 -b .blanks -%patch4 -p0 -b .colorls -%patch5 -p0 -b .dspmbyte -%patch6 -p0 -b .catalogs -%patch7 -p0 -b .blk_buf -%patch8 -p0 -b .metakey +%setup -q +%patch1 -b .pipe +%patch2 -b .normcmd +%patch4 -b .colorls +%patch5 -b .dspmbyte +%patch6 -b .catalogs +%patch7 -b .blk_buf +%patch8 -b .metakey %patch9 -p1 -b .histlock -%patch10 -p0 -b .histmerg -%patch -b .0 +%patch10 -b .histmerg +%patch0 -b .0 %build cflags () @@ -112,7 +93,7 @@ Provides translations to the package tcsh set +o noclobber } CC=gcc - CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DBUFSIZE=8192 -pipe" + CFLAGS="%{optflags} -D_GNU_SOURCE -DBUFSIZE=8192 -pipe" cflags -ftree-loop-linear CFLAGS cflags -Wl,-O2 LDFLAGS cflags -Wl,--as-needed LDFLAGS @@ -128,19 +109,19 @@ Provides translations to the package tcsh --bindir=/bin \ --sysconfdir=/etc \ --localstatedir=/var \ - --sharedstatedir=%_datadir \ - --infodir=%_infodir \ - --mandir=%_mandir \ - --libexecdir=/usr/%{_lib}/tcsh \ + --sharedstatedir=%{_datadir} \ + --infodir=%{_infodir} \ + --mandir=%{_mandir} \ + --libexecdir=%{_libdir}/tcsh \ --disable-rpath \ --with-gnu-ld - make -# + make %{?_smp_mflags} + +%check # requires a working terminal on stdin -# make check +#make check %{?_smp_mflags} %install - rm -rf $RPM_BUILD_ROOT for nls in nls/*.cat ; do msg=$nls nls=${nls##*/} @@ -156,41 +137,38 @@ Provides translations to the package tcsh uk*) nls=uk_UA ;; C) continue ;; esac - dir=$RPM_BUILD_ROOT/usr/share/locale/${nls}/LC_MESSAGES + dir=%{buildroot}%{_datadir}/locale/${nls}/LC_MESSAGES test ! -e ${dir}/tcsh || continue mkdir -p -m 0755 $dir install -m 0444 ${msg} ${dir}/tcsh done - make DESTDIR=$RPM_BUILD_ROOT GENCAT='/usr/bin/gencat --new' install - make DESTDIR=$RPM_BUILD_ROOT GENCAT='/usr/bin/gencat --new' install.man - mkdir -p $RPM_BUILD_ROOT%{_docdir}/tcsh - install -m 0444 FAQ $RPM_BUILD_ROOT%{_docdir}/tcsh/FAQ.tcsh - mkdir -p $RPM_BUILD_ROOT/etc/profile.d/ - mkdir -p $RPM_BUILD_ROOT/usr/bin - install -m 644 $RPM_SOURCE_DIR/bindkey.tcsh $RPM_BUILD_ROOT/etc/profile.d/ - install -m 644 $RPM_SOURCE_DIR/complete.tcsh $RPM_BUILD_ROOT/etc/profile.d/ - rm -f $RPM_BUILD_ROOT/bin/csh - rm -f $RPM_BUILD_ROOT/usr/bin/csh - rm -f $RPM_BUILD_ROOT/usr/bin/tcsh - rm -f $RPM_BUILD_ROOT%{_mandir}/man1/csh.* - rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/C - ln -sf tcsh $RPM_BUILD_ROOT/bin/csh - ln -sf tcsh.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/csh.1.gz - ln -sf ../../bin/tcsh $RPM_BUILD_ROOT/usr/bin/csh - ln -sf ../../bin/tcsh $RPM_BUILD_ROOT/usr/bin/tcsh - -%clean - rm -rf $RPM_BUILD_ROOT + make DESTDIR=%{buildroot} GENCAT='%{_bindir}/gencat --new' install + make DESTDIR=%{buildroot} GENCAT='%{_bindir}/gencat --new' install.man + mkdir -p %{buildroot}%{_docdir}/tcsh + install -m 0444 FAQ %{buildroot}%{_docdir}/tcsh/FAQ.tcsh + mkdir -p %{buildroot}%{_sysconfdir}/profile.d/ + mkdir -p %{buildroot}%{_prefix}/bin + install -m 644 $RPM_SOURCE_DIR/bindkey.tcsh %{buildroot}%{_sysconfdir}/profile.d/ + install -m 644 $RPM_SOURCE_DIR/complete.tcsh %{buildroot}%{_sysconfdir}/profile.d/ + rm -f %{buildroot}/bin/csh + rm -f %{buildroot}%{_bindir}/csh + rm -f %{buildroot}%{_bindir}/tcsh + rm -f %{buildroot}%{_mandir}/man1/csh.* + rm -rf %{buildroot}%{_datadir}/locale/C + ln -sf tcsh %{buildroot}/bin/csh + ln -sf tcsh.1.gz %{buildroot}%{_mandir}/man1/csh.1.gz + ln -sf ../../bin/tcsh %{buildroot}%{_bindir}/csh + ln -sf ../../bin/tcsh %{buildroot}%{_bindir}/tcsh %files %defattr(-,root,root) %dir %{_docdir}/tcsh /bin/csh /bin/tcsh -%config /etc/profile.d/bindkey.tcsh -%config /etc/profile.d/complete.tcsh -/usr/bin/csh -/usr/bin/tcsh +%config %{_sysconfdir}/profile.d/bindkey.tcsh +%config %{_sysconfdir}/profile.d/complete.tcsh +%{_bindir}/csh +%{_bindir}/tcsh %doc %{_docdir}/tcsh/FAQ.tcsh %doc %{_mandir}/man1/csh.1.gz %doc %{_mandir}/man1/tcsh.1.gz