···11-Source: tumble
22-Section: web
33-Priority: optional
44-Maintainer: Michael Stahnke <stahnma@websages.com>
55-Build-Depends: cdbs, debhelper (>> 7)
66-Build-Depends-Indep: perl
77-Standards-Version: 3.8.4
88-Homepage: http://github.com/websages/tumble
99-1010-Package: tumble
1111-Architecture: all
1212-Depends: ${shlibs:Depends}, ${misc:Depends}, libcrypt-ssleay-perl, apache2, libapache2-mod-perl2, libdbd-mysql-perl, libcgi-application-perl
1313-Description: Web application used by websages.
1414- A classic tumblelog written in Perl in something like 2004.
-37
debian/fixshebang.sh
···11-#!/bin/bash
22-33-for target_dir in $@
44-do
55- for f in `find "$target_dir" -type f 2>/dev/null`
66- do
77- textflag=0
88- filetype="`file -b $f`"
99- for ft in $filetype
1010- do
1111- if [ "${#ft}" -lt 4 ]
1212- then
1313- continue
1414- fi
1515- if [ "${ft:0:4}" == "text" ]
1616- then
1717- textflag=1
1818- break
1919- fi
2020- done
2121-2222- if [ "$textflag" -eq 0 ]
2323- then
2424- continue
2525- fi
2626-2727- cp -pf $f $f.tmp
2828- sed -e '1,1s,^#![ ]*\([^ ]*\)/\(ruby\|env ruby\)$,#!/opt/puppet/bin/ruby,' \
2929- -e '1,1s,^#![ ]*\([^ ]*\)/\(wish\|perl\)$,#!/usr/bin/\2,' < $f > $f.tmp
3030- if ! cmp $f $f.tmp >/dev/null
3131- then
3232- mv -f $f.tmp $f
3333- else
3434- rm -f $f.tmp
3535- fi
3636- done
3737-done
-16
debian/rules
···11-#!/usr/bin/make -f
22-33-include /usr/share/cdbs/1/rules/debhelper.mk
44-include /usr/share/cdbs/1/rules/buildcore.mk
55-66-77-binary-install/tumble::
88- env DESTDIR=$(CURDIR)/debian/$(cdbs_curpkg) make install
99-# for file in `find $(CURDIR)/debian/tmp -type f`; do; echo $$file ; sed -i -e '1s,^#!.*perl,#!%{_bindir}/perl,' $$file; done
1010-1111-binary-post-install/tumble::
1212- bash $(CURDIR)/debian/fixshebang.sh \
1313- '$(CURDIR)/debian/$(cdbs_curpkg)/srv/www'
1414-1515-1616-clean::
-77
tumble.spec
···11-22-Name: tumble
33-Version: ==VERSION==
44-Release: 1%{?dist}
55-Summary: A classic tumblelog application.
66-77-Group: Internet/Applications
88-License: ASL 2.0
99-URL: http://tumble.wcyd.org
1010-Source0: %{name}-%{version}.tar.gz
1111-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(id -un)
1212-1313-Requires: perl(DBD::mysql)
1414-Requires: httpd mod_perl
1515-Requires: perl-CGI-Application
1616-Requires: perl-Crypt-SSLeay
1717-# Only when running on localhost, but that's what's hard-coded for now.
1818-Requires: mysql-server
1919-BuildRequires: httpd
2020-#BuildRequires: golang
2121-BuildArch: noarch
2222-2323-%description
2424-A classic tumblelog written in Perl in something like 2004.
2525-2626-%prep
2727-%setup -q
2828-rm -rf debian
2929-3030-%build
3131-3232-3333-%install
3434-rm -rf $RPM_BUILD_ROOT
3535-make install DESTDIR=%{buildroot}
3636-3737-# Fix shebang line of scripts
3838-for file in `find $RPM_BUILD_ROOT -type f`; do
3939-echo $file
4040- sed -i -e '1s,^#!.*perl,#!%{_bindir}/perl,' $file
4141-done
4242-4343-mkdir -p %{buildroot}%{_sysconfdir}/tumble
4444-pushd %{buildroot}/srv/www/%{name}/htdocs; ln -fs ../../../..%{_sysconfdir}/tumble/config.yaml .; popd
4545-if /usr/sbin/httpd -v | head -1 | awk '{print $3}' | cut -d/ -f2 | grep 2.2 &> /dev/null ; then
4646- cp -pr conf/tumble_22.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/tumble.conf
4747-else
4848- cp -pr conf/tumble_24.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d
4949-fi
5050-5151-5252-5353-%files
5454-%doc sql README.md
5555-%dir %{_sysconfdir}/tumble
5656-%config(noreplace)%{_sysconfdir}/tumble/*
5757-%config(noreplace)%{_sysconfdir}/httpd/conf.d/*
5858-/srv/www/%{name}/htdocs/2202
5959-/srv/www/%{name}/htdocs/*.png
6060-/srv/www/%{name}/htdocs/buttons
6161-/srv/www/%{name}/htdocs/css
6262-/srv/www/%{name}/htdocs/favicon.ico
6363-/srv/www/%{name}/htdocs/img
6464-/srv/www/%{name}/htdocs/index.cgi
6565-/srv/www/%{name}/htdocs/irclink
6666-/srv/www/%{name}/htdocs/lib
6767-/srv/www/%{name}/htdocs/quote
6868-/srv/www/%{name}/htdocs/search.cgi
6969-/srv/www/%{name}/htdocs/thtml
7070-/srv/www/%{name}/htdocs/config.yaml
7171-#/usr/local/bin/*
7272-#%config(noreplace)%{_sysconfdir}/cron.hourly/*
7373-7474-7575-%changelog
7676-* Sun Oct 27 2013 <stahnma@websages.com> - 1.0.0-1
7777-- First packaging