1SUMMARY="Note taking application, write down your thoughts"
2DESCRIPTION="Notes is an open source and cross-platform note-taking app that is both beautiful \
3and powerful.
4
5Features:
6- Native app (written in C++ with Qt).
7- Fast with a low memory footprint.
8- Fully open source and cross-platform (Linux, macOS, Windows).
9- Completely private - tracks nothing.
10- Beautiful and sleek looking, yet still powerful.
11- Folders and tags. Organize your ideas hierarchically using nested folders and universally \
12using tags.
13- Markdown Support. Format text without lifting your hands from the keyboard.
14- Different themes. Switch between Light, Dark, and Sepia.
15- Feed View. Select multiple notes to see them all one after another in the editor.
16- Always runs in the background. Use the hotkey Win+Shift+N to summon Notes. Ctrl+N for macOS.
17- Keyboard shortcuts. Meant to have the option to be used solely with a keyboard (but more work \
18needs to be done there).
19- What feature will you contribute?"
20HOMEPAGE="https://get-notes.com"
21COPYRIGHT="2023 nuttyartist et all"
22LICENSE="MPL v2.0"
23REVISION="2"
24SOURCE_URI="https://github.com/nuttyartist/notes/archive/refs/tags/v2.1.0.tar.gz"
25CHECKSUM_SHA256="8a8ae079fad6d9d5e9206acf5f4d19e1e73e1196e6c27408072b5cccf8778b95"
26srcGitRev_2="efdb2e5a25e5646390f8658e3321f6e9a4c3561a"
27SOURCE_URI_2="https://github.com/b00f/qautostart/archive/$srcGitRev_2.tar.gz"
28CHECKSUM_SHA256_2="5eb501b31916fdb516979c6a19dc17a64711186090a29f92be4a6f0704e819cd"
29SOURCE_DIR_2="qautostart-$srcGitRev_2"
30srcGitRev_3="b2926abe78a98d79290106b17016e99a251f4a8c"
31SOURCE_URI_3="https://github.com/pbek/qmarkdowntextedit/archive/$srcGitRev_3.tar.gz"
32CHECKSUM_SHA256_3="c1af63c7be3444ee3df848a11371e121f504d7fed7483bbac0f90e9fd7fe07f8"
33SOURCE_DIR_3="qmarkdowntextedit-$srcGitRev_3"
34srcGitRev_4="14c1bef71d26c915eeaa05c988c55bdad98e1d75"
35SOURCE_URI_4="https://github.com/alex-spataru/QSimpleUpdater/archive/$srcGitRev_4.tar.gz"
36CHECKSUM_SHA256_4="a23f78f846b9dfb4074d2371923c76dc5c7415548056ecb3454189bb02e8e8f4"
37SOURCE_DIR_4="QSimpleUpdater-$srcGitRev_4"
38ADDITIONAL_FILES="notes.rdef.in"
39
40ARCHITECTURES="all !x86_gcc2"
41SECONDARY_ARCHITECTURES="x86"
42
43PROVIDES="
44	notes$secondaryArchSuffix = $portVersion
45	app:Notes = $portVersion
46	"
47REQUIRES="
48	haiku$secondaryArchSuffix
49	lib:libGL$secondaryArchSuffix
50	lib:libQt6Concurrent$secondaryArchSuffix
51	lib:libQt6Core$secondaryArchSuffix
52	lib:libQt6Gui$secondaryArchSuffix
53	lib:libQt6Network$secondaryArchSuffix
54	lib:libQt6Sql$secondaryArchSuffix
55	lib:libQt6Widgets$secondaryArchSuffix
56	lib:libX11$secondaryArchSuffix
57	"
58
59BUILD_REQUIRES="
60	haiku${secondaryArchSuffix}_devel
61	xlibe${secondaryArchSuffix}_devel
62	devel:libQt6Concurrent$secondaryArchSuffix
63	devel:libQt6Core$secondaryArchSuffix
64	devel:libQt6DBus$secondaryArchSuffix
65	devel:libQt6Gui$secondaryArchSuffix
66	devel:libQt6Network$secondaryArchSuffix
67	devel:libQt6Sql$secondaryArchSuffix
68	devel:libQt6Test$secondaryArchSuffix
69	devel:libQt6Widgets$secondaryArchSuffix
70	devel:libxcb$secondaryArchSuffix
71	"
72BUILD_PREREQUIRES="
73	cmd:cmake
74	cmd:gcc$secondaryArchSuffix
75	cmd:make
76	"
77
78BUILD()
79{
80	cp -rf $sourceDir2/* 3rdParty/qautostart
81	cp -rf $sourceDir3/* 3rdParty/qmarkdowntextedit
82	cp -rf $sourceDir4/* 3rdParty/QSimpleUpdater
83	cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
84		$cmakeDirArgs \
85		-DUPDATE_CHECKER=OFF
86	make -C build $jobArgs
87}
88
89INSTALL()
90{
91	make -C build install
92	mkdir -p $appsDir
93	mv $prefix/bin/notes $appsDir/Notes
94	rm -rf $dataDir
95
96	local MAJOR="`echo "$portVersion" | cut -d. -f1`"
97	local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
98	local MINOR="`echo "$portVersion" | cut -d. -f3`"
99	local APP_NAME="Notes"
100	local LONG_INFO="$SUMMARY"
101	local APP_SIGNATURE="application/x-vnd.notes"
102	sed \
103		-e "s|@MAJOR@|$MAJOR|" \
104		-e "s|@MIDDLE@|$MIDDLE|" \
105		-e "s|@MINOR@|$MINOR|" \
106		-e "s|@LONG_INFO@|$LONG_INFO|" \
107		-e "s|@APP_NAME@|$APP_NAME|" \
108		-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
109		$portDir/additional-files/notes.rdef.in > notes.rdef
110
111	addResourcesToBinaries notes.rdef $appsDir/Notes
112
113	addAppDeskbarSymlink $appsDir/Notes Notes
114}
115