mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	meson: convert post-install.sh to python
Inspired by: 36a2e4f8a7 (0cc1139e3347f573ae1feee5b73dbc8a8a21fcfa_0_14)
Signed-off-by: David Heidelberg <david@ixit.cz>
			
			
This commit is contained in:
		
							parent
							
								
									a17cc55c4c
								
							
						
					
					
						commit
						5231483432
					
				
					 4 changed files with 16 additions and 14 deletions
				
			
		| 
						 | 
					@ -58,7 +58,7 @@ EXTRA_DIST = \
 | 
				
			||||||
	src/modules/bluetooth/meson.build \
 | 
						src/modules/bluetooth/meson.build \
 | 
				
			||||||
	src/modules/echo-cancel/meson.build \
 | 
						src/modules/echo-cancel/meson.build \
 | 
				
			||||||
	src/modules/gsettings/meson.build \
 | 
						src/modules/gsettings/meson.build \
 | 
				
			||||||
	src/modules/gsettings/post-install.sh \
 | 
						src/modules/gsettings/meson_post_install.py \
 | 
				
			||||||
	src/modules/meson.build \
 | 
						src/modules/meson.build \
 | 
				
			||||||
	src/modules/oss/meson.build \
 | 
						src/modules/oss/meson.build \
 | 
				
			||||||
	src/modules/raop/meson.build \
 | 
						src/modules/raop/meson.build \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,7 +29,7 @@ install_data('org.freedesktop.pulseaudio.gschema.xml',
 | 
				
			||||||
  install_dir : join_paths(datadir, 'glib-2.0', 'schemas')
 | 
					  install_dir : join_paths(datadir, 'glib-2.0', 'schemas')
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
meson.add_install_script('post-install.sh', datadir)
 | 
					meson.add_install_script('meson_post_install.py', datadir)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Conversion from GConf to GSettings
 | 
					# Conversion from GConf to GSettings
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										14
									
								
								src/modules/gsettings/meson_post_install.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/modules/gsettings/meson_post_install.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,14 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env python3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					import subprocess
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					datadir = sys.argv[1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Package managers set this so we don't need to run
 | 
				
			||||||
 | 
					if not os.environ.get('DESTDIR'):
 | 
				
			||||||
 | 
					    schemadir = os.path.join(datadir, 'glib-2.0', 'schemas')
 | 
				
			||||||
 | 
					    print('Compiling gsettings schemas...')
 | 
				
			||||||
 | 
					    subprocess.call(['glib-compile-schemas', schemadir])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +0,0 @@
 | 
				
			||||||
#!/bin/sh
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set -e
 | 
					 | 
				
			||||||
set -u
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DATADIR="$1"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Package managers set this so we don't need to run
 | 
					 | 
				
			||||||
if [ "${DESTDIR:-}" ]; then exit 0; fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo "Compiling GSettings schemas..."
 | 
					 | 
				
			||||||
glib-compile-schemas "$DATADIR/glib-2.0/schemas"
 | 
					 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue