Name: gnumed-server Version: 14.6 Release: 2%{?dist} Summary: The GNUmed back end server Group: Applications/Productivity License: GPLv2 URL: http://wiki.gnumed.de/ Source0: http://www.gnumed.de/downloads/server/v14/%{name}.%{version}.tgz Patch0: gnumed-server-14.6.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildArch: noarch Requires: python-psycopg2 Requires: mailx Requires: bzip2 Requires: gnupg2 Requires: openssl Requires: postgresql Requires: postgresql-client Requires: postgresql-filedump Requires: rsync %description The GNUmed project builds an open source Electronic Medical Record. It is developed by a handful of medical doctors and programmers from all over the world. It can be useful to anyone documenting the health of patients, including but not limited to doctors, physical therapists, occupational therapists. %prep %setup -q -n gnumed-server.%{version} %patch0 -p1 %build %install pushd server #Copy to /sharedstatedir/gnumed-server/ mkdir -p %{buildroot}%{_sharedstatedir}/%{name} cp -p -r bootstrap %{buildroot}%{_sharedstatedir}/%{name} cp -p -r pycommon %{buildroot}%{_sharedstatedir}/%{name} cp -p -r sql %{buildroot}%{_sharedstatedir}/%{name} cp __init__.py %{buildroot}%{_sharedstatedir}/%{name} echo "%{version}" > %{buildroot}%{_sharedstatedir}/%{name}/version.txt # silcence bootstrap process by setting interactive to 'no' and set 'gm-dbo' as default password for conffile in `find %{buildroot}/%{_sharedstatedir}/%{name}/bootstrap -maxdepth 1 -type f -name \*.conf` ; do \ sed -i 's/^\(interactive[[:space:]]*=[[:space:]]*\)yes/\1no/' "$conffile" ; \ sed -i 's/^\(password[[:space:]]*=[[:space:]]*\)/\1 gm-dbo/' "$conffile" ; \ done #copy config files to /etc mkdir -p %{buildroot}%{_sysconfdir}/%{name} for conf in `ls etc/gnumed/*.conf.example`; do mv $conf `echo $conf|sed 's/.example//'`; done cp -p -r etc/gnumed/*.conf %{buildroot}%{_sysconfdir}/%{name} #create .gz files and copy them to mandir mkdir -p %{buildroot}%{_mandir}/man8/ mkdir -p %{buildroot}%{_mandir}/man1/ for man in `ls doc/*.*`; \ do gzip $man; \ done cp -p doc/*.8.gz %{buildroot}%{_mandir}/man8 cp -p doc/*.1.gz %{buildroot}%{_mandir}/man1 #remove .sh extensions #copy all scripts to bin dir mkdir -p %{buildroot}%{_bindir} for script in `ls ./*.sh`; do mv $script `echo $script|sed 's/.sh//'`; done cp gm-* %{buildroot}%{_bindir} #copy all docs to default doc dir mkdir -p %{buildroot}%{_defaultdocdir}/%{name} cp -p doc/README %{buildroot}%{_defaultdocdir}/%{name} cp -r -p doc/schema %{buildroot}%{_defaultdocdir}/%{name} cp -p GnuPublicLicense.txt %{buildroot}%{_defaultdocdir}/%{name} popd %files %defattr(-,root,root,-) %doc %{_defaultdocdir}/%{name}/* %{_sharedstatedir}/%{name}/* %{_bindir}/* %{_mandir}/man8/* %{_mandir}/man1/* %config(noreplace) %{_sysconfdir}/%{name}/* %changelog * Sun Feb 27 2011 - Susmit Shannigrahi - 14.6-2%{?dist} - Whole lot of fixes the spec file. * Wed Jan 12 2011 - Susmit Shannigrahi - 14.6-1%{?dist} - New upstream release. * Sun Jan 02 2011 - Susmit Shannigrahi - 14.5-1%{?dist} - Initial packaging based on Sebastian Hilbert's unofficial package for F13.