#   FILE: %(FILE) -- 
# AUTHOR: %(FULLNAME) <%(EMAIL)>
#   DATE: %(DAY) %(MONTH) %(YEAR)
#
# Copyright (C) %(YEAR) %(FULLNAME) <%(EMAIL)>
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

AUTOMAKE_OPTIONS = gnu

SUBDIRS = src include dry

EXTRA_DIST = %(PROJ_NAME)_applet.gnorba %(PROJ_NAME)_applet.desktop

sysdir = $(datadir)/applets/FIXME example: Network
sys_DATA = %(PROJ_NAME)_applet.desktop

gnorbadir = $(sysconfdir)/CORBA/servers
gnorba_DATA = %(PROJ_NAME)_applet.gnorba

# For local development use only.
WEB_DIR = %(WEB_DIR:/tmp)

# For local development use only.
# ============================= rpm ============================================
rpm: dry dist
	cp $(distdir).tar.gz %(RPM_TOP_DIR)/SOURCES
	rpm -ba dry/$(PACKAGE).spec

# For local development use only.
# ============================= publish ========================================
publish: rpm
	cp $(PACKAGE)-$(VERSION).tar.gz $(WEB_DIR)/projects/$(PACKAGE)
	cp $(HOME)/development/rpms/RPMS/i386/$(PACKAGE)-$(VERSION)-*.i386.rpm \
	$(WEB_DIR)/projects/$(PACKAGE)
	cp ChangeLog $(WEB_DIR)/ChangeLog/ChangeLog.$(PACKAGE)
	if [ ! -d $(WEB_DIR)/projects/$(PACKAGE) ]; then mkdir $(WEB_DIR)/projects/$(PACKAGE); fi
	( \
		cd $(WEB_DIR)/projects/$(PACKAGE); \
		ln -sf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE).tar.gz; \
		ln -sf $(PACKAGE)-$(VERSION)-1.i386.rpm $(PACKAGE).i386.rpm; \
		if [ ! -d sgml ]; then mkdir sgml; fi; \
	)
	cp dry/overview_%(PROJ_NAME:FIXME).sgml $(WEB_DIR)/projects/$(PACKAGE)/sgml/overview.sgml
	cp dry/overview_web_wrapper.sgml $(WEB_DIR)/projects/$(PACKAGE)/sgml
	( cd $(WEB_DIR); make install )
