spec do recenzji

Grzegorz Saracki sarak w gisz.net.pl
¦ro, 19 Wrz 2007, 09:43:56 CEST


Witam

Posyłam pierwszego speca jakiego zrobiłem do recenzji.
ProszÄ™ o konstruktywna krytykÄ™ ;).

pozdrawiam
-- 
+ Grzegorz Saracki aka Sarak
+ mail: sarak [at] gisz.net.pl   
-------------- następna czę¶ć ---------
# $Revision:$, $Date:$
Summary:	Multiuser web-based photo gallery engine
Summary(pl.UTF-8):	Wielodostępna aplikacja www do przechowywania zdjęć
Name:		photo-organizer
Version:	2.34
%define		rcver	rc4
Release:	0.%{rcver}.2
License:	GPL
Group:		Applications/WWW
Source0:	http://po.shaftnet.org/_media/po-%{version}-%{rcver}.tar.bz2
URL:		http://po.shaftnet.org/
BuildRequires:	rpmbuild(macros) >= 1.268
Requires:	webapps
Requires:	webserver
Requires:	webserver(alias)
Requires:	webserver(php) >= 5.0
Requires:       php(pgsql)
Requires:       php(bcmath)
Requires:       php(xml)
Requires:	lcms
Requires:	dcraw
Requires:	ufraw-batch
Requires:	exif
Requires:	ImageMagick-coder-jpeg

BuildArch:	noarch
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# see SOURCES/webapps.README for description and complete listing

%define		_appdir		%{_datadir}/%{name}
%define		_webapps	/etc/webapps
%define		_webapp		%{name}
%define		_sysconfdir	%{_webapps}/%{_webapp}
%define         _podir    /home/services/%{name}

# in case _sysconfdir is not in webapps dir, run this replace pattern
# before copy-pasting to your spec: :%s#%{_sysconfdir}#%{_webapps}/%{_webapp}#g

%description
Photo Organizer is a multiuser web-based photo gallery engine. It
differentiates itself by focusing on asset management, aiming at the
needs of professional photographers. Photo Organizer is highly
scalable, capable of handling tens of thousands of images with ease.
Coupled with robust importing, exporting, searching, tagging, and
printing capabilities, it is intended to act as a photographer's
primary image repository. It requires PostgreSQL database.

%description -l pl.UTF-8
Photo Organizer jest wielodostępowa aplikacją sieciową z dostępem
przez WWW. WyrĂłznia siÄ™ szczegĂłlnym zwrĂłceniem uwagi na zarzÄ…dzanie
zdjęciami, jest skierowany do profesjonalnych fotografów. Photo
Organizer jest wysoko skalowalny, zdolny przechowywać dziesiątki
tysięcy obrazów. Posiada funkcje importu, eksportu, przeszukiwania,
znakowania i druku, jest przewidziany jako głowne repozytorium
fotografa. Wymaga bazy danych PostgreSQL.

%prep
%setup -n po-%{version}-%{rcver} -q

cat > apache.conf <<'EOF'
Alias /%{name} %{_appdir}
<Directory %{_appdir}>
	Allow from all
</Directory>
EOF

cat > lighttpd.conf <<'EOF'
alias.url += (
        "/%{name}" => "%{_appdir}",
)
EOF


cat > config_site.php <<'EOF'
<?php
/* Site-specific configuration follows.  Please make changes here,
   instead of modifying config.php
 */
$site_url = "http://localhost/%{name}";  // This site url
$site_title = "My Photo Organizer"; // Appears in the titlebar on every page.
// For additional database configuration examples, see config.php
// Use a local database via UNIX socket (fast and secure, default)
$db_dsn = "dbname=po_db user=po_user password=po_password";
$image_repository_path = "%{_podir}/repo";
$sys_dcraw = "/usr/bin/dcraw";
/* The default language  -- see src/lang/* for your options */
$po_options['lang'] = "en_US";
// set this to 0 once your installation is finished.
$install_enabled = 1;
?>
EOF

%install
rm -rf $RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT%{_sysconfdir}
install -d $RPM_BUILD_ROOT%{_appdir}/{sql,im,help,ie7,lang,include,themes/aqua/jscalendar,javascript/jscalendar/lang,java/{search.layout/buttons,buttons,search.color/buttons}}
install -d $RPM_BUILD_ROOT%{_podir}/repo
install config_site.php $RPM_BUILD_ROOT%{_sysconfdir}/config_site.php
ln -s %{_sysconfdir}/config_site.php $RPM_BUILD_ROOT%{_appdir}/include/config_site.php

install src/*.php src/*.html src/*.txt src/*.dtd src/*.dist $RPM_BUILD_ROOT%{_appdir}
install src/sql/*.sql $RPM_BUILD_ROOT%{_appdir}/sql
install src/help/*.html $RPM_BUILD_ROOT%{_appdir}/help
install src/im/*.icc src/im/*.icm $RPM_BUILD_ROOT%{_appdir}/im
install src/ie7/* $RPM_BUILD_ROOT%{_appdir}/ie7
install src/lang/*.php $RPM_BUILD_ROOT%{_appdir}/lang
install src/include/*.php $RPM_BUILD_ROOT%{_appdir}/include
install src/java/search.color/*.java src/java/search.color/*.class $RPM_BUILD_ROOT%{_appdir}/java/search.color
install src/java/search.color/buttons/*.gif $RPM_BUILD_ROOT%{_appdir}/java/search.color/buttons
install src/java/search.layout/*.java src/java/search.layout/*.class $RPM_BUILD_ROOT%{_appdir}/java/search.layout
install src/java/search.layout/buttons/*.gif $RPM_BUILD_ROOT%{_appdir}/java/search.layout/buttons
install src/javascript/*.js $RPM_BUILD_ROOT%{_appdir}/javascript
install src/javascript/jscalendar/*.js $RPM_BUILD_ROOT%{_appdir}/javascript/jscalendar
install src/javascript/jscalendar/lang/*.js $RPM_BUILD_ROOT%{_appdir}/javascript/jscalendar/lang
install src/themes/*.gif src/themes/*.jpg $RPM_BUILD_ROOT%{_appdir}/themes
install src/themes/aqua/*.gif src/themes/aqua/*.css src/themes/aqua/*.php src/themes/aqua/*.xcf src/themes/aqua/*.jpg src/themes/aqua/*.png $RPM_BUILD_ROOT%{_appdir}/themes/aqua
install src/themes/aqua/jscalendar/*.gif src/themes/aqua/jscalendar/*.css $RPM_BUILD_ROOT%{_appdir}/themes/aqua/jscalendar

install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
install lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf

# %webapp_* macros usage extracted from %{_libdir}/rpm/macros.build:
#
# Usage:
#   %%webapp_register HTTPD WEBAPP
#   %%webapp_unregister HTTPD WEBAPP

%triggerin -- apache1 < 1.3.37-3, apache1-base
%webapp_register apache %{_webapp}

%triggerun -- apache1 < 1.3.37-3, apache1-base
%webapp_unregister apache %{_webapp}

%triggerin -- apache < 2.2.0, apache-base
%webapp_register httpd %{_webapp}

%triggerun -- apache < 2.2.0, apache-base
%webapp_unregister httpd %{_webapp}

%triggerin -- lighttpd
%webapp_register lighttpd %{_webapp}

%triggerun -- lighttpd
%webapp_unregister lighttpd %{_webapp}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc CHANGES COPYING README

%dir %attr(750,root,http) %{_sysconfdir}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config_site.php

%dir %{_appdir}
%dir %attr(750,root,http) %{_podir}
%dir %attr(750,http,http) %{_podir}/repo
%{_appdir}/*.html
%{_appdir}/*.php
%{_appdir}/*.dist
%{_appdir}/*.dtd
%{_appdir}/*.txt
%{_appdir}/sql
%{_appdir}/java
%{_appdir}/ie7
%{_appdir}/lang
%{_appdir}/javascript
%{_appdir}/include
%{_appdir}/im
%{_appdir}/themes
%{_appdir}/help


%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback w pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org


$Log:$


Więcej informacji o li¶cie dyskusyjnej pld-devel-pl