| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- # Embed the Spry CSS framework (css/spry.css + css/themes/spry-theme-*.css)
- # into the library as precompressed ConstantStatumResource classes, served by
- # default at /_statum/resource/spry.css and /_statum/resource/spry-theme-*.css
- # (registered by SpryModule, like Statum's own client scripts).
- statum_mkres = find_program('statum-mkres')
- themes = {
- 'airy': 'Airy',
- 'dwarf': 'Dwarf',
- 'formal': 'Formal',
- 'glassy': 'Glassy',
- 'h2o': 'H2o',
- 'living-sky': 'LivingSky',
- 'modern': 'Modern',
- }
- spry_css = custom_target('spry-css',
- input: files('../css/spry.css'),
- output: 'SpryCss.vala',
- command: [statum_mkres,
- '-o', '@OUTPUT@',
- '-n', 'spry.css',
- '--class-name', 'SpryCss',
- '--ns', 'Spry.Resources',
- '-c', 'text/css',
- '@INPUT@']
- )
- theme_resources = []
- foreach slug, suffix : themes
- theme_resources += custom_target('spry-theme-@0@'.format(slug),
- input: files('../css/themes/spry-theme-@0@.css'.format(slug)),
- output: 'SpryTheme@0@.vala'.format(suffix),
- command: [statum_mkres,
- '-o', '@OUTPUT@',
- '-n', 'spry-theme-@0@.css'.format(slug),
- '--class-name', 'SpryTheme@0@'.format(suffix),
- '--ns', 'Spry.Resources',
- '-c', 'text/css',
- '@INPUT@']
- )
- endforeach
- sources = files(
- 'SpryModule.vala',
- 'Auth.vala',
- 'Authentication/UserEntity.vala',
- 'Authentication/UserPermissionEntity.vala',
- 'Authentication/UserProjection.vala',
- 'Authentication/UserService.vala',
- 'Authentication/Migrations/M0001_Initial.vala',
- 'Actions/UserManagementAction.vala',
- 'Actions/UserActionPrivate.vala',
- 'Actions/ProfileValidation.vala',
- 'Actions/LoginAction.vala',
- 'Actions/RegisterAction.vala',
- 'Actions/LogoutAction.vala',
- 'Actions/ChangePasswordAction.vala',
- 'Actions/SetUserEnabledAction.vala',
- 'Actions/GrantPermissionAction.vala',
- 'Actions/RevokePermissionAction.vala',
- 'Actions/AlterUserAction.vala',
- 'Actions/DeleteUserAction.vala',
- )
- library_version = meson.project_version()
- libspry = shared_library('spry-@0@'.format(library_version),
- sources, spry_css, theme_resources,
- dependencies: [glib_dep, gobject_dep, gio_dep, invercargill_dep, invercargill_json_dep, json_glib_dep, inversion_dep, astralis_dep, libxml_dep, sodium_deps, invercargill_sql_dep, sqlite_dep, invercargill_sql_inversion_dep, statum_dep],
- install: true,
- vala_gir: 'spry-@0@.gir'.format(library_version),
- install_dir: [true, true, true, true]
- )
- pkg = import('pkgconfig')
- pkg.generate(libspry,
- version : library_version,
- name : 'spry-@0@'.format(library_version),
- requires : [statum_dep])
- spry_dep = declare_dependency(
- link_with: libspry,
- include_directories: include_directories('.'),
- dependencies: [glib_dep, gobject_dep, gio_dep, invercargill_dep, invercargill_json_dep, json_glib_dep, inversion_dep, statum_dep]
- )
|