[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [225] trunk/dists

Revision: 225
Author:   einhverfr
Date:     2006-10-18 14:28:12 -0700 (Wed, 18 Oct 2006)

Log Message:
Added prototype of spec file for RPM generation

Added Paths:

Added: trunk/dists/rpm/spec
--- trunk/dists/rpm/spec	                        (rev 0)
+++ trunk/dists/rpm/spec	2006-10-18 21:28:12 UTC (rev 225)
@@ -0,0 +1,141 @@
+Summary: LedgerSMB - Open Source accounting software
+Name: ledger-smb
+Version: 1.1.1d
+Release: 1
+License: GPL
+URL: http://www.ledgersmb.org/
+Group: Applications/Office
+Source0: http://prdownloads.sourceforge.net/ledger-smb/%{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildArch: noarch
+Requires: perl >= 5.8, httpd, postgresql-server >= 8.1, perl-DBD-Pg, perl-DBI
+BuildRequires: perl
+AutoReqProv: no
+LedgerSMB is a double-entry accounting system written in perl.
+LedgerSMB is a fork of sql-ledger offering better security and data integrity, 
+and many advanced features.
+SELinux should be disabled to use this RPM.
+To finalize the installation:
+Start PostgreSQL, let /var/lib/pgsql/data/pg_hba.conf start with
+local   all         postgres                          ident sameuser
+local   all         all                               md5
+and restart PostgreSQL
+Create databaseuser, create database and initialize it
+su - postgres -c "createuser -d ledger-smb --no-createdb --no-createrole --no-superuser -P"
+(remember the password!)
+su - postgres -c "createdb ledger-smb"
+su - postgres -c "createlang plpgsql ledger-smb"
+Delete the "password" in %{_localstatedir}/lib/%{name}/users/members and
+browse http://localhost/ledger-smb/admin.pl and set a ledger-smb master password.
+In "Pg Database Administration" the "User" defaults to the database user "ledger-smb"
+we just created - specify the password and "Create Dataset".
+Set "Create Dataset" to the database "ledger-smb" we just created and continue.
+In "Add User" specify the Dataset, User and password again for each user.
+%setup -q -n ledger-smb
+# generate .conf from default with fixes
+perl -p -e 's,^(\$ENV\{PATH\}),#\1,g' ledger-smb.conf.default > ledger-smb.conf
+# fix location
+perl -pi -e "s,/usr/local/ledger-smb,%{_datadir}/%{name},g" ledger-smb-httpd.conf
+# Most stuff is installed readonly in %{_datadir}/%{name}/
+# Some parts are installed other places with other policies and symlinked in place
+mkdir -p -m0755 $RPM_BUILD_ROOT%{_datadir}/%{name} # /usr/share/ledger-smb - primary and cgi directory
+mkdir -p -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} # /etc/ledger-smb - links to configs
+mkdir -p -m0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name} # /var/lib/ledger-smb - data files, modified by cgi
+mkdir -p -m0755 $RPM_BUILD_ROOT%{_localstatedir}/spool/%{name} # /var/spool/ledger-smb - spool files, modified by cgi
+# rm setup.pl SL2LS.pl # FiXME - install somewhere else...
+# the executable conf
+mv ledger-smb.conf $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/ledger-smb.conf
+# link from /etc to our executable conf
+ln -s ../..%{_localstatedir}/lib/%{name}/ledger-smb.conf \
+ $RPM_BUILD_ROOT%{_sysconfdir}/ledger-smb/
+# link from cgi stuff to our executable conf
+ln -s ../../..%{_localstatedir}/lib/%{name}/ledger-smb.conf \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/ledger-smb.conf
+# menu.ini is pure configuration
+mv menu.ini $RPM_BUILD_ROOT%{_sysconfdir}/ledger-smb/menu.ini
+ln -s ../../..%{_sysconfdir}/ledger-smb/menu.ini \
+  $RPM_BUILD_ROOT%{_datadir}/%{name}/menu.ini
+# install forelevant parts in data / cgi directory
+cp -rp *.pl favicon.ico index.html ledger-smb.gif ledger-smb.png ledger-smb_small.png menu.ini \
+ bin LedgerSMB sql utils locale \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/
+# users - written by cgi
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/users
+ln -s ../../..%{_localstatedir}/lib/%{name}/users \
+  $RPM_BUILD_ROOT%{_datadir}/%{name}/users
+cat << TAK > $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/users/members
+# LedgerSMB Accounting members
+[root login]
+# css - written by cgi
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/css
+ln -s ../../..%{_localstatedir}/lib/%{name}/css \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/css
+cp -rp css/* \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/css
+# templates - written by cgi
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/templates
+ln -s ../../..%{_localstatedir}/lib/%{name}/templates \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/templates
+cp -rp templates/* \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/templates
+# spool - written by cgi
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/%{name}
+ln -s ../../..%{_localstatedir}/spool/%{name} \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/spool
+# install the apache config file
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
+install -m 644 ledger-smb-httpd.conf \
+ $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
+%attr(0700, apache, apache) %config(noreplace) %{_localstatedir}/lib/%{name}
+%attr(0700, apache, apache) %dir %{_localstatedir}/spool/%{name}
+%attr(0640, root,   apache) %config(noreplace) %{_sysconfdir}/ledger-smb
+%attr(0640, root,   apache) %config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
+%doc doc/*
+* Wed Oct 18 2006 Mads Kiilerich <..hidden..> - 1.1.1d-1
+- Initial version

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.