SUMMARY="A tool to manage a history of the system clipboard"
DESCRIPTION="Clipdinger solves the problem that you often have to paste some \
text you've just recently copied to the clipboard, but which has been \
replaced by something you've copied more recently... It also saves the \
history so it'll appear just as you left it on the last shutdown.

Clipdinger provides a history of your recent clippings and lets you create \
your own favorites. It also offers a clipboard monitor that can be used as a \
replicant on the Desktop, always showing the current contents.

You access the history by pressing SHIFT + ALT + V, which opens the \
Clipdinger window where you can select an entry with the cursor keys and \
paste it by hitting RETURN.

After selecting a clip, you can also paste it to the an online service by \
hitting ALT + P. The returned URL for the clip is put into the \
clipboard for you to paste into your email or IRC channel etc.

ESCAPE minimizes the window without pasting.

Please see the ReadMe available from the Help menu for more details."
HOMEPAGE="http://humdingerb.github.io/clipdinger/"
COPYRIGHT="2015-2021 Humdinger"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/humdingerb/clipdinger/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="94a935028413e1ee07768f59c8409313f5715e6df4756b641b77154e1e1f0bc3"

ARCHITECTURES="all"

USER_SETTINGS_FILES="
	settings/Clipdinger directory
	"

PROVIDES="
	clipdinger = $portVersion
	add_on:ClipdingerInputDevice = $portVersion
	app:Clipdinger = $portVersion
	"
REQUIRES="
	haiku
	cmd:curl
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:g++
	cmd:make
	"

BUILD()
{
	make $jobArgs OBJ_DIR=objects
	make bindcatalogs OBJ_DIR=objects

	cd input_device
	make $jobArgs OBJ_DIR=objects
}

INSTALL()
{
	clipdingerDir=$appsDir/Clipdinger

	mkdir -p $clipdingerDir
	cp -af objects/Clipdinger $clipdingerDir
	cp -af ReadMe.html $clipdingerDir
	cp -r images $clipdingerDir

	mkdir -p $dataDir/user_launch
	cp -af Clipdinger_userlaunch $dataDir/user_launch/Clipdinger

	mkdir -p $addOnsDir/input_server/devices
	cp -af input_device/objects/ClipdingerInputDevice \
		$addOnsDir/input_server/devices

	addAppDeskbarSymlink $clipdingerDir/Clipdinger
}
