On Wed, 30 Jul 2014, Greg Bailey wrote:

> I've checked for existing submissions and it doesn't appear that anyone else
> has started this effort yet?  I'd like to confirm that's the case before going
> too much further.

we packaged it locally a while back, but 'punted' on writing 
the database setup and maintenace wizards, which we consided a 
'must have' item for a general public release

-- Russ herrold

#
#       .spec file Copyright (c) 2012 R P Herrold
#       reports to: i...@owlriver.com please
#
%define         gitpull 20131216
#
Name:           dl
Summary:        dl: Download Ticket Service
Version:        0.0.%{gitpull}.git
Release:        1%dist
License:        FIXME
Group:          Applications/Web
URL:            FIXME
Source:         %{name}-%{gitpull}.tgz
# Source0:      %{name}-httpd.conf

Prefix:         /usr
BuildRoot:      /var/tmp/%{name}-%{version}.root

Requires:               httpd
Requires:               sqlite
# Requires:             php
Requires:               php-mbstring
Requires:               php-pecl-apc

%description
"dl" is a file exchange service that allows you to upload 
any file to a web server and generate a unique ticket for 
others to download. The ticket is automatically expired 
according to the specified rules, so that you don't need 
to keep track or cleanup afterward. "dl" also allows you 
to grant an anonymous, one-time upload for others to send 
you a file, without the requirement of account management

%prep

%setup -n %{name}-%{gitpull}

## we are a webbish setup, and some side support scripts
%build

%install
# make install
mkdir -p %{buildroot}/var/spool/%{name}/
#
#       this next gets htdocs/include as well
mkdir -p %{buildroot}/usr/share/%{name}/htdocs/

mkdir -p %{buildroot}/etc/%{name}/
# to either include/config.php or 
#       /etc/dl.php and customize as needed. This usually means 
#       changing the URL and E-Mail of the service.

mkdir -p %{buildroot}/etc/httpd/conf.d/
#
rsync -av htdocs/ %{buildroot}/usr/share/%{name}/htdocs/
cp htdocs/include/config.php.dist %{buildroot}/etc/%{name}/dl.php
cp %{name}-httpd.conf %{buildroot}/etc/httpd/conf.d/%{name}.conf

%post 
# install instructions say: run: scripts/rip-environment
[ ! -e /etc/dl.php ] && ln -s /etc/%{name}/dl.php /etc/dl.php || :
[ ! -e /var/spool/dl/data.sdb ] && {
        cd /var/spool/dl/
        # as userid: apache
        su -c "sqlite data.sdb" apache < 
/usr/share/%{name}/include/scripts/sqlite.sql
        chmod 660 data.sdb
        }

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc %{name}.spec %{name}-httpd.conf 
%attr(770,apache,apache) /var/spool/%{name}/
%config(noreplace) /etc/%{name}/dl.php
%config(noreplace) /etc/httpd/conf.d/%{name}.conf
/usr/share/%{name}/
#
#       .spec file Copyright (c) 2012 R P Herrold
#       reports to: i...@owlriver.com please
#
%define         gitpull 20131216
#
Name:           dl
Summary:        dl: Download Ticket Service
Version:        0.0.%{gitpull}.git
Release:        1%dist
License:        FIXME
Group:          Applications/Web
URL:            FIXME
Source:         %{name}-%{gitpull}.tgz
# Source0:      %{name}-httpd.conf

Prefix:         /usr
BuildRoot:      /var/tmp/%{name}-%{version}.root

# BuildRequires:        develFIXME
# BuildRequires:        tkinter
Requires:               httpd
Requires:               sqlite
# Requires:             php
Requires:               php-mbstring
Requires:               php-pecl-apc

%description
"dl" is a file exchange service that allows you to upload 
any file to a web server and generate a unique ticket for 
others to download. The ticket is automatically expired 
according to the specified rules, so that you don't need 
to keep track or cleanup afterward. "dl" also allows you 
to grant an anonymous, one-time upload for others to send 
you a file, without the requirement of account management

%prep

%setup -n %{name}-%{gitpull}

## we are a webbish setup, and some side support scripts
%build

%install
# make install
mkdir -p %{buildroot}/var/spool/%{name}/
#
#       this next gets htdocs/include as well
mkdir -p %{buildroot}/usr/share/%{name}/htdocs/

mkdir -p %{buildroot}/etc/%{name}/
# to either include/config.php or 
#       /etc/dl.php and customize as needed. This usually means 
#       changing the URL and E-Mail of the service.

mkdir -p %{buildroot}/etc/httpd/conf.d/
#
rsync -av htdocs/ %{buildroot}/usr/share/%{name}/htdocs/
cp htdocs/include/config.php.dist %{buildroot}/etc/%{name}/dl.php
cp %{name}-httpd.conf %{buildroot}/etc/httpd/conf.d/%{name}.conf

%post 
# install instructions say: run: scripts/rip-environment
[ ! -e /etc/dl.php ] && ln -s /etc/%{name}/dl.php /etc/dl.php || :
[ ! -e /var/spool/dl/data.sdb ] && {
        cd /var/spool/dl/
        # as userid: apache
        su -c "sqlite data.sdb" apache < 
/usr/share/%{name}/include/scripts/sqlite.sql
        chmod 660 data.sdb
        }

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc %{name}.spec %{name}-httpd.conf 
%attr(770,apache,apache) /var/spool/%{name}/
%config(noreplace) /etc/%{name}/dl.php
%config(noreplace) /etc/httpd/conf.d/%{name}.conf
/usr/share/%{name}/

Reply via email to