Blob Blame History Raw
%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}

Name:           tkdnd
Version:        1.0a2
Release:        15%{?dist}
Summary:        Tk extension that adds native drag & drop capabilities

Group:          Development/Libraries
License:        BSD
URL:            http://tkdnd.sourceforge.net/
Source0:        http://dl.sourceforge.net/tkdnd/tkdnd-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  tk-devel, libXext-devel, libXft-devel
Requires: tcl(abi) = 8.5
Patch1: tkdnd-1.0-rpmoptflags.patch       
Patch2: tkdnd-1.0-64bit.patch

%description
Tk Drag & Drop: tkdnd is an extension that adds native drag & drop capabilities
to the tk toolkit. It can be used with any tk version equal or greater to 8.4.
Under unix the drag & drop protocol in use is the XDND protocol version 4
(also used by the QT toolkit, KDE & GNOME Desktops).

%prep
%setup -q

%patch1 -p1 -b .1-rpmoptflags
%patch2 -p1 -b .2-64bit
%{__sed} -i 's/\r//' doc/XDND_Protocol/drop_no_xdnd.html doc/XDND_Protocol/examples.html doc/XDND_Protocol/dragging_files.html doc/XDND_Protocol/xdnd.html

%build
cd unix
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
cd unix
mkdir -p $RPM_BUILD_ROOT/%{tcl_sitearch}/%{name}-%{version}
install -p -m 0755 ../lib/tkdnd/*.so $RPM_BUILD_ROOT/%{tcl_sitearch}/%{name}-%{version}
install -p -m 0644 ../lib/tkdnd/*.tcl $RPM_BUILD_ROOT/%{tcl_sitearch}/%{name}-%{version}

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc doc/*
%{tcl_sitearch}/%{name}-%{version}/


%changelog
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0a2-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0a2-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0a2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Dec 03 2008 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-12
- Add missing requires on libXft

* Wed Dec 03 2008 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-11
- Add requires on tcl

* Tue Feb 12 2008 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-10
- Rebuilt for gcc-4.3

* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 1.0a2-9
- Rebuild for selinux ppc32 issue.

* Tue Jul 03 2007 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-8
- Move to tcl_sitearch

* Mon Aug 28 2006 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-7
- FC6 Mass Rebuild

* Fri Jun 08 2006 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-6
- Removed the extra directory in %_doc by adding a wildcard
- Moved the "rm -rf $RPM_BUILD_ROOT" to the very first line in %_install

* Fri Jun 08 2006 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-5
- dropped sed magic, install files by hand instead

* Fri Jun 02 2006 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-4
- 64bit patch for tk headers too now

* Thu Jun 01 2006 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-3
- added 64bit patch
- sed magic instead of passing libdir to configure and rm libtkdnd.dll

* Wed May 31 2006 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-2
- fixed W: tkdnd unstripped-binary-or-object /usr/lib/tkdnd/libtkdnd.so (thanks Paul Howard)
- removed tcl-devel als buildreq since it is required by tk-devel

* Tue May 30 2006 Sander Hoentjen <sander@hoentjen.eu> - 1.0a2-1
- created