debian swirl logo

Back to the packages list tdiary

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk

DEB_INSTALL_DIRS_ALL = usr/share/tdiary
TDIARY_ROOT = $(DEB_DESTDIR)/usr/share/tdiary
manpages = tdiary-setup.1 tdiary-convert2.1

$(manpages): %.1: debian/%.sgml
		docbook-to-man $< > $@

clean::
		rm -f $(manpages)

common-build-indep:: $(manpages)

common-install-indep::
		mkdir -p $(TDIARY_ROOT)
		install -m 755 index.rb index.fcgi update.rb $(TDIARY_ROOT)/
		install -m 644 tdiary.rb dot.htaccess tdiary.conf.* $(TDIARY_ROOT)/
		install -D -m 755 misc/convert2.rb $(DEB_DESTDIR)/usr/bin/tdiary-convert2
		rsync -rlpqHSC js misc skel spec plugin tdiary $(TDIARY_ROOT)/

	# Install default theme
		mkdir -p $(TDIARY_ROOT)/theme
		rsync -rlpqHSC theme/*.css theme/*.png theme/default $(TDIARY_ROOT)/theme/

	# Install vendor libraries
		install -m 644 vendor/hikidoc-0.0.6/lib/hikidoc.rb $(TDIARY_ROOT)/

	# Install Debian original scripts
		rsync -rlpqHSC debian/debian-tools $(TDIARY_ROOT)/
		install -m 755 debian/TC_tdiary-setup.rb $(TDIARY_ROOT)/
		install -m 644 debian/20theme_url.rb     $(TDIARY_ROOT)/plugin/
		install -D -m 755 debian/tdiary-setup.rb $(DEB_DESTDIR)/usr/bin/tdiary-setup

	# Fix permissions
		find $(TDIARY_ROOT)/misc/plugin -type f -exec chmod 644 {} +
		chmod 755 $(TDIARY_ROOT)/misc/plugin/squeeze.rb
		chmod 755 $(TDIARY_ROOT)/misc/plugin/xmlrpc/xmlrpc.rb
		chmod 755 $(TDIARY_ROOT)/misc/plugin/amazon/amazonimg.rb
		chmod 755 $(TDIARY_ROOT)/debian-tools/*.rb

	# Cleanup
		find $(cdbs_curdestdir) -name license.txt -exec rm -f {} +

install/tdiary-theme::
	# Install themes except default
		rsync -rlpqHSC \
			--exclude=/theme/default/ \
			--exclude='/theme/*.css' \
			--exclude='/theme/*.png' \
			--exclude='/theme/README' \
			theme $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/tdiary/

	# Fix permissions
		find $(CURDIR)/debian/$(cdbs_curpkg) -type f -exec chmod 644 {} +

Builds:

tdiary
communication-friendly weblog system
tdiary-plugin
plugins of tdiary to add functionalities
tdiary-theme
themes of tdiary to change the design