Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > contrib-release-src > by-pkgid > 913099654e7e992165328eff57c78380 > files > 3

listgarden-1.3.1-4mdv2009.0.src.rpm

%define version 1.3.1
%define tversion 1-3-1
%define fname ListGarden
 
Summary:		RSS feed generator program
Name:			listgarden
Version:		%version
Release:		%mkrel 4
License:		GPL
Group:			Editors
URL:			http://www.softwaregarden.com/products/listgarden/index.html
Source:			%{name}-%{tversion}.tar.bz2
Source1:		%{name}logo48.gif
Source2:		README.cgi
BuildRoot:		%{_tmppath}/%{name}-%{version}-buildroot
BuildArch:		noarch
BuildRequires:		ImageMagick, dos2unix
Requires:		perl-CGI, gtkdialogs

%description
ListGarden is a tool for manually creating and maintaining RSS 
feeds. It is an easy to use open source authoring tool operated with 
a browser interface that can run locally on a computer running Windows, 
Mac OS X, or Linux, or accessed remotely through a web server. The 
resulting XML file may be stored locally or automatically copied to a 
remote web server using FTP. It is useful for RSS feeds that need to be 
maintained without an automatic system that has built-in RSS generation 
capability. It can be used for RSS feeds that are change logs, event 
lists, lists of physical objects, or post lists of podcasts and 
manually authored weblogs.

Access the editor locally at: 
	http://127.0.0.1:6555 (after running listgarden)

%package cgi
Summary:		RSS feed generator program (cgi version)
Group:			Editors
Requires:		apache, listgarden

%description cgi
ListGarden-cgi is a remotely accessible version of ListGarden.
Before installing ListGarden for remote access, make sure that you 
are aware of the security issues  it may raise. For example, the 
"Local Filename" setting lets the user save the result anywhere the 
program has access. When run remotely, you may want to protect the 
program with a password (such as by using .htaccess) so that only 
authorized users can run it. For this reason, install and use remote 
access with caution.

Access the editor remotely at: 
	http://hostname/cgi-bin/listgarden/listgardencgi.pl

%prep
%setup -q -n %{name}
dos2unix gpl.txt

%build

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_bindir}
install %{name}.pl $RPM_BUILD_ROOT%{_bindir}/%{name}
chmod +x $RPM_BUILD_ROOT%{_bindir}/%{name}
install -d $RPM_BUILD_ROOT%{perl_vendorlib}
install %{fname}.pm $RPM_BUILD_ROOT%{perl_vendorlib}
install %{fname}License.pm $RPM_BUILD_ROOT%{perl_vendorlib}
install -d $RPM_BUILD_ROOT%{_var}/www/cgi-bin/%{name}
install %{name}cgi.pl $RPM_BUILD_ROOT%{_var}/www/cgi-bin/%{name}
cp %{SOURCE2} .

#wrapper script
cat << EOF > $RPM_BUILD_ROOT/%{_bindir}/x%{name}
#!/bin/sh
RETVAL=1
gmessage -buttons "Start ListGarden":0,Cancel:1 -default Cancel -nearmouse -timeout 5 "Access the editor at http://127.0.0.1:6555"
RETVAL=\$?
if [ "\$RETVAL" = 0 ]; then
    listgarden
fi
EOF

chmod +x $RPM_BUILD_ROOT%{_bindir}/x%{name}

#menu

mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
cat > $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=ListGarden
Comment=ListGarden RSS Feed Generator
Exec=%{_bindir}/xlistgarden
Icon=%{name}
Terminal=false
Type=Application
StartupNotify=true
Categories=X-MandrivaLinux-Internet-WebEditors;Network;WebDevelopment;
EOF

#icons
mkdir -p $RPM_BUILD_ROOT/{%_liconsdir,%_iconsdir,%_miconsdir}
convert %{SOURCE1} -geometry 32x32 %{buildroot}%{_iconsdir}/%{name}.png
convert %{SOURCE1} -geometry 48x48 %{buildroot}%{_liconsdir}/%{name}.png
convert %{SOURCE1} -geometry 16x16 %{buildroot}%{_miconsdir}/%{name}.png

%if %mdkversion < 200900
%post
%update_menus
%endif
                
%if %mdkversion < 200900
%postun
%clean_menus
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-,root,root)
%doc gpl.txt
%{_bindir}/%{name}
%{_bindir}/x%{name}
%{perl_vendorlib}/%{fname}*
%{_datadir}/applications/%{name}.desktop
%{_liconsdir}/%{name}.png
%{_iconsdir}/%{name}.png
%{_miconsdir}/%{name}.png

%files cgi
%doc README.cgi
%defattr (-,root,root)
%attr(0760, apache, apache) %dir %{_var}/www/cgi-bin/%{name}
%{_var}/www/cgi-bin/%{name}/%{name}cgi.pl



%changelog
* Mon Jul 28 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.3.1-4mdv2009.0
+ Revision: 251199
- rebuild
- fix spacing at top of description
- fix 'error: for key "Icon" in group "Desktop Entry" is an icon name with an
  extension, but there should be no extension as described in the Icon Theme
  Specification if the value is not an absolute path'
- drop old menu

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas

* Thu Jan 03 2008 Olivier Blin <oblin@mandriva.com> 1.3.1-2mdv2008.1
+ Revision: 140932
- restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request
    - import listgarden


* Thu Aug 24 2006 Stew Benedict <sbenedict@mandriva.com> 1.3.1-2mdv2007.0
- xdg menu

* Tue Nov 22 2005 Stew Benedict <sbenedict@mandrakesoft.com> 1.3.1-1mdk
- first mdv packaging