Skip to content

Commit 94b2991

Browse files
committed
fix version number in appdata file. Auto generated from debian/changelog file
1 parent 24d0577 commit 94b2991

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@
4040
</screenshot>
4141
</screenshots>
4242
<releases>
43-
<release version="4.0.0" date="2024-12-13"/>
43+
<release version="@VERSION@" date="@DATE@"/>
4444
</releases>
4545
</component>

debian/meson.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Define the command to extract the version
2+
cmd = ['bash', '-c', 'head -n 1 changelog | sed "s/.*(//g;s/).*//g"']
3+
4+
# Create a custom target
5+
version = run_command(cmd, check:true).stdout().strip()
6+
add_project_arguments('-DVERSION='+version, language: 'cpp')

meson.build

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ src = [
2323
'src/utils/misc.c',
2424
]
2525

26+
version = '0.0.0'
27+
2628
subdir('po')
29+
subdir('debian')
2730

2831
if get_option('resources')
2932
# Build qrc
@@ -120,5 +123,14 @@ desktopdir = get_option('prefix')/'share/applications'
120123
executable('pardus-pen', src, dependencies: qt_dep, link_args: link_args, install: true)
121124
install_data('data/tr.org.pardus.pen.svg', install_dir : icondir)
122125
install_data('data/tr.org.pardus.pen.desktop', install_dir : desktopdir)
123-
install_data('data/tr.org.pardus.pen.appdata.xml', install_dir : get_option('prefix') / 'share/metainfo')
124126
install_data('data/tr.org.pardus.pen.mime.xml', install_dir : get_option('prefix') / 'share/mime/packages/')
127+
128+
configure_file(
129+
input: 'data/tr.org.pardus.pen.appdata.xml.in',
130+
output: 'tr.org.pardus.pen.appdata.xml',
131+
configuration: {
132+
'VERSION': version,
133+
'DATE': run_command(['date', '+%Y-%m-%d'], check: true).stdout().strip()
134+
}
135+
)
136+
install_data(meson.current_build_dir()/'tr.org.pardus.pen.appdata.xml', install_dir : get_option('prefix') / 'share/metainfo')

0 commit comments

Comments
 (0)