Verified Commit fa56a570 authored by Bobby Rong's avatar Bobby Rong 🍙
Browse files

build: Automate copyright year management

parent 26215098
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -6,9 +6,10 @@ dnl 2006-2016 Mike Massonnet <mmassonnet@xfce.org>
dnl 2023 Arthur Demchenkov <spinal.by@gmail.com>
dnl

m4_define([copyright_year], [2025])
XDT_VERSION_INIT([1.11.2], [git])

AC_COPYRIGHT([Copyright (c) 2003-2025 The Xfce development team. All rights reserved.])
AC_COPYRIGHT([Copyright (c) 2003-copyright_year() The Xfce development team. All rights reserved.])
AC_PREREQ([2.69])
AC_INIT([Notes], [xdt_version], [https://gitlab.xfce.org/panel-plugins/xfce4-notes-plugin], [xfce4-notes-plugin],
	[https://docs.xfce.org/panel-plugins/xfce4-notes-plugin])
@@ -16,6 +17,9 @@ AC_REVISION([xdt_version_build])
AC_CANONICAL_TARGET()
AC_CONFIG_HEADERS([config.h])
AC_DEFINE([VERSION_FULL], [PACKAGE_VERSION], [Alias for VERSION and PACKAGE_VERSION for meson compatibility])
COPYRIGHT_YEAR=copyright_year()
AC_DEFINE_UNQUOTED([COPYRIGHT_YEAR], ["$COPYRIGHT_YEAR"], [Copyright year])
AC_SUBST([COPYRIGHT_YEAR])

LT_PREREQ([2.2.6])
LT_INIT([disable-static])
+1 −1
Original line number Diff line number Diff line
@@ -1003,7 +1003,7 @@ namespace Xnp {
				"logo-icon-name", "org.xfce.notes.logo",
				"comments", _("Ideal for your quick notes"),
				"version", Config.VERSION_FULL,
				"copyright", "Copyright © 2003-2025 The Xfce development team",
				"copyright", "Copyright © 2003-" + Config.COPYRIGHT_YEAR + " The Xfce development team",
				"license", Xfce.get_license_text (Xfce.LicenseTextType.GPL),
				"website", "https://docs.xfce.org/panel-plugins/xfce4-notes-plugin",
				"website-label", "docs.xfce.org",
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
[CCode (cprefix = "", cheader_filename = "config.h")]
#endif
namespace Config {
	[CCode (cname = "COPYRIGHT_YEAR")]
	public const string COPYRIGHT_YEAR;
	[CCode (cname = "GETTEXT_PACKAGE")]
	public const string GETTEXT_PACKAGE;
	[CCode (cname = "PACKAGE_LOCALE_DIR")]
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ project(

project_namespace = 'panel-plugins'
pkgdatadir = get_option('prefix') / get_option('datadir') / 'xfce4' / 'notes'
copyright_year = '2025'

vala = meson.get_compiler('vala')
cc = meson.get_compiler('c')
@@ -104,6 +105,7 @@ extra_cflags += [
  '-DPACKAGE_STRING="@0@ @1@"'.format(meson.project_name(), meson.project_version()),
  '-DPACKAGE_DATADIR="@0@"'.format(pkgdatadir),
  '-DPKGDATADIR="@0@"'.format(pkgdatadir),
  '-DCOPYRIGHT_YEAR="@0@"'.format(copyright_year),
  '-DPACKAGE_LOCALE_DIR="@0@"'.format(get_option('prefix') / get_option('localedir')),
  '-DPACKAGE_URL="https://docs.xfce.org/@0@/@1@/start"'.format(project_namespace, meson.project_name()),
  '-DPACKAGE_BUGREPORT="https://gitlab.xfce.org/@0@/@1@/-/issues"'.format(project_namespace, meson.project_name()),