Blob Blame History Raw
%define	profiledir	%{_sysconfdir}/profile.d

Name:		cdargs
Version:	1.35
Release:	10%{?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
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

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

%build
%configure
make %{?_smp_mflags}
%{_emacs_bytecompile} contrib/cdargs.el

%install
rm -rf $RPM_BUILD_ROOT
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

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root, -)
%{_bindir}/cdargs
%config(noreplace) %{profiledir}/cdargs.*
%doc %{_mandir}/man1/cdargs.1*
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS TODO

%files devel
%defattr(-, root, root, -)
%{_includedir}/cdargs.h

%files -n emacs-cdargs
%defattr(-, root, root, -)
%dir %{_emacs_sitelispdir}/%{name}
%{_emacs_sitelispdir}/%{name}/*.elc
%{_emacs_sitestartdir}/cdargs-init.el

%files -n emacs-cdargs-el
%defattr(-, root, root, -)
%{_emacs_sitelispdir}/%{name}/*.el

%changelog
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.35-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.35-9
- Rebuilt for c++ ABI breakage

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.35-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.35-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Mar 14 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 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 <rel-eng@lists.fedoraproject.org> - 1.35-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.35-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild


* Sun Jan 11 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 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 <xjakub@fi.muni.cz> - 1.35-2
- Fixed non-capital starting letter in the summary of emacs-cdargs subpackage.

* Sat Mar 08 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 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