diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..996a158 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +cdargs-1.35.tar.gz diff --git a/cdargs-1.35_emacs-init.el b/cdargs-1.35_emacs-init.el new file mode 100644 index 0000000..bd068bd --- /dev/null +++ b/cdargs-1.35_emacs-init.el @@ -0,0 +1,2 @@ +;; This defines the function cdargs and an alias cv +(require 'cdargs) diff --git a/cdargs-1.35_format_security.patch b/cdargs-1.35_format_security.patch new file mode 100644 index 0000000..3ddc550 --- /dev/null +++ b/cdargs-1.35_format_security.patch @@ -0,0 +1,13 @@ +diff --git a/src/cdargs.cc b/src/cdargs.cc +index e505e4e..1fdfeb8 100644 +--- a/src/cdargs.cc ++++ b/src/cdargs.cc +@@ -1301,7 +1301,7 @@ void helpscreen(void) { + + void fatal_exit(char* msg) { + endwin(); +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + exit(1); + } + diff --git a/cdargs-1.35_shebangs.patch b/cdargs-1.35_shebangs.patch new file mode 100644 index 0000000..e7abb6e --- /dev/null +++ b/cdargs-1.35_shebangs.patch @@ -0,0 +1,39 @@ +diff -Naur cdargs-1.35/contrib/cdargs-bash.sh cdargs-1.35_patched/contrib/cdargs-bash.sh +--- cdargs-1.35/contrib/cdargs-bash.sh 2006-03-03 00:28:17.000000000 +0100 ++++ cdargs-1.35_patched/contrib/cdargs-bash.sh 2008-03-08 11:02:21.000000000 +0100 +@@ -1,5 +1,3 @@ +-#!/bin/sh +- + # (C) 2002-2003 Dan Allen and Stefan Kamphausen + + # Written by Dan Allen +@@ -166,7 +164,7 @@ + local tmpfile + + # first clear any bookmarks with this same alias, if file exists +- if [[ "$CDARGS_NODUPS" && -e "$HOME/.cdargs" ]]; then ++ if [ "$CDARGS_NODUPS" -a -e "$HOME/.cdargs" ]; then + tmpfile=`echo ${TEMP:-${TMPDIR:-/tmp}} | sed -e "s/\\/$//"` + tmpfile=$tmpfile/cdargs.$USER.$$.$RANDOM + grep -v "^$1 " "$HOME/.cdargs" > $tmpfile && 'mv' -f $tmpfile "$HOME/.cdargs"; +@@ -256,4 +254,11 @@ + complete $nospace -S / -X '*/' -F _cdargs_aliases cv cb cdb + } + ++# we do not support anything besides bash completion ++# (however patches to support other shells are very welcome) ++ ++if [ -z "${BASH_VERSION}" ]; then ++ return 100 ++fi ++ + _cdargs_complete +diff -Naur cdargs-1.35/contrib/cdargs-tcsh.csh cdargs-1.35_patched/contrib/cdargs-tcsh.csh +--- cdargs-1.35/contrib/cdargs-tcsh.csh 2005-11-06 11:58:13.000000000 +0100 ++++ cdargs-1.35_patched/contrib/cdargs-tcsh.csh 2008-03-08 11:02:29.000000000 +0100 +@@ -1,5 +1,3 @@ +-#!/bin/csh +- + # (C) 2002-2005 Stefan Kamphausen + + # (T)CShell extensions written by diff --git a/cdargs.spec b/cdargs.spec new file mode 100644 index 0000000..f973db7 --- /dev/null +++ b/cdargs.spec @@ -0,0 +1,169 @@ +%define profiledir %{_sysconfdir}/profile.d + +Name: cdargs +Version: 1.35 +Release: 17%{?dist} +Summary: The shell cd with bookmarks and browser + +Group: Applications/File +License: GPLv2+ +URL: http://www.skamphausen.de/cgi-bin/ska/CDargs/ +Source0: http://www.skamphausen.de/downloads/cdargs/%{name}-%{version}.tar.gz +Source1: %{name}-%{version}_emacs-init.el +Patch0: %{name}-%{version}_shebangs.patch +Patch1: %{name}-1.35_format_security.patch + +BuildRequires: ncurses-devel +BuildRequires: emacs + +%description +Enables the user to quickly change working directory by navigating cd arguments +and expanding the shell built-in cd with bookmarks and browser. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries + +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains development files for %{name}. + +%package -n emacs-cdargs +Summary: Cdargs support for Emacs +Group: Applications/Editors +BuildArch: noarch + +Requires: %{name} = %{version}-%{release} +Requires: emacs(bin) >= %{_emacs_version} + +%description -n emacs-cdargs +This is an Emacs front-end to cdargs. It provides a function (cv or +cdargs) which uses the same bookmarks list as the terminal program +cdargs and lets the user quickly make a directory listed there the +current working directory. + +%package -n emacs-cdargs-el +Summary: Elisp source files for Cdargs support for Emacs +Group: Applications/Editors +BuildArch: noarch + +Requires: emacs-%{name} = %{version}-%{release} + +%description -n emacs-cdargs-el +This package contains the Elisp source for providing Cdargs support in +Emacs. You don't need to install this package to have Emacs support for +Cdargs. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%configure +make %{?_smp_mflags} +%{_emacs_bytecompile} contrib/cdargs.el + +%install +make install DESTDIR=$RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT%{profiledir} +mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir} +mkdir -p $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name} + +install -p -m 644 contrib/cdargs.el* $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name} +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_emacs_sitestartdir}/cdargs-init.el + +install -p -m 644 contrib/cdargs-bash.sh $RPM_BUILD_ROOT%{profiledir}/cdargs.sh +install -p -m 644 contrib/cdargs-tcsh.csh $RPM_BUILD_ROOT%{profiledir}/cdargs.csh +install -D -p -m 644 src/cdargs.h $RPM_BUILD_ROOT%{_includedir}/cdargs.h + +%files +%{_bindir}/cdargs +%config(noreplace) %{profiledir}/cdargs.* +%doc %{_mandir}/man1/cdargs.1* +%doc AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS TODO + +%files devel +%{_includedir}/cdargs.h + +%files -n emacs-cdargs +%dir %{_emacs_sitelispdir}/%{name} +%{_emacs_sitelispdir}/%{name}/*.elc +%{_emacs_sitestartdir}/cdargs-init.el + +%files -n emacs-cdargs-el +%{_emacs_sitelispdir}/%{name}/*.el + +%changelog +* Wed Jun 17 2015 Fedora Release Engineering - 1.35-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 1.35-16 +- Rebuilt for GCC 5 C++11 ABI change + +* Fri Aug 15 2014 Fedora Release Engineering - 1.35-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Thu Jul 31 2014 Yaakov Selkowitz - 1.35-14 +- Fix FTBFS with -Werror=format-security (#1037010, #1106037) +- Cleanup spec + +* Sat Jun 07 2014 Fedora Release Engineering - 1.35-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 1.35-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 1.35-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 1.35-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Feb 28 2012 Fedora Release Engineering - 1.35-9 +- Rebuilt for c++ ABI breakage + +* Thu Jan 12 2012 Fedora Release Engineering - 1.35-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 1.35-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Mar 14 2010 Jonathan G. Underwood - 1.35-6 +- Update spec file to bring it into compliance with Emacs add-on packaging + guidelines +- Split Elisp source files into separate subpackage + +* Fri Jul 24 2009 Fedora Release Engineering - 1.35-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Feb 23 2009 Fedora Release Engineering - 1.35-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + + +* Sun Jan 11 2009 Milos Jakubicek - 1.35-3 +- Fixed usage in other shells than bash: minor compatibility code changes and + no complains because completion doesn't work (fix BZ#479398). + +* Tue Mar 25 2008 Milos Jakubicek - 1.35-2 +- Fixed non-capital starting letter in the summary of emacs-cdargs subpackage. + +* Sat Mar 08 2008 Milos Jakubicek - 1.35-1 +- Initial package based on SRPM provided by author. +- Removed Packager: and Vendor: field. +- Removed unnecessary making RPM_BUILD_ROOT directory. +- Changed license from GPL to GPLv2+. +- Extended description. +- Setup section is silent now (-p). +- Added SMP flags for building. +- Added directory mode to defattr. +- Added dist tag. +- Changed buildroot directory to default. +- Removed execute rights and shebangs (Patch0) from cdargs.sh, cdargs.csh as + they will be only sourced, not executed. +- Both files cdargs.sh and cdargs.csh marked as config(noreplace). +- Added -devel subpackage with cdargs.h +- Added emacs-cdargs subpackage with cdargs.el +- Added emacs init script as Source1 diff --git a/dead.package b/dead.package deleted file mode 100644 index 0164146..0000000 --- a/dead.package +++ /dev/null @@ -1,3 +0,0 @@ -2015-12-06: Retired orphaned package, because it was orphaned for -more than six weeks. - diff --git a/sources b/sources new file mode 100644 index 0000000..8cda820 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +50be618d67f0b9f2439526193c69c567 cdargs-1.35.tar.gz