Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ class MakeRPMConfig extends MakeConfig {
this.prep,
this.build,
this.install,
this.postun,
List<String>? postinstallScripts,
List<String>? postuninstallScripts,
this.files,
this.defattr,
this.attr,
this.changelog,
});
}) : _postinstallScripts = postinstallScripts ?? [],
_postuninstallScripts = postuninstallScripts ?? [];

factory MakeRPMConfig.fromJson(Map<String, dynamic> json) {
return MakeRPMConfig(
Expand Down Expand Up @@ -63,7 +65,12 @@ class MakeRPMConfig extends MakeConfig {
prep: json['prep'] as String?,
build: json['build'] as String?,
install: json['install'] as String?,
postun: json['postun'] as String?,
postinstallScripts: json['postinstall_scripts'] != null
? List.castFrom<dynamic, String>(json['postinstall_scripts'])
: null,
postuninstallScripts: json['postuninstall_scripts'] != null
? List.castFrom<dynamic, String>(json['postuninstall_scripts'])
: (json['postun'] != null ? [json['postun'] as String] : null),
files: json['files'] as String?,
defattr: json['defattr'] as String?,
attr: json['attr'] as String?,
Expand All @@ -80,6 +87,8 @@ class MakeRPMConfig extends MakeConfig {
List<String>? supportedMimeType;
List<String>? actions;
List<String>? categories;
List<String> _postinstallScripts;
List<String> _postuninstallScripts;

//RPM preamble Spec file fields
String? summary;
Expand All @@ -97,12 +106,21 @@ class MakeRPMConfig extends MakeConfig {
String? prep;
String? build;
String? install;
String? postun;
String? files;
String? defattr;
String? attr;
String? changelog;

List<String> get postScripts => [
'update-mime-database %{_datadir}/mime &> /dev/null || :',
..._postinstallScripts,
];

List<String> get postunScripts => [
'update-mime-database %{_datadir}/mime &> /dev/null || :',
..._postuninstallScripts,
];

@override
Map<String, dynamic> toJson() {
return {
Expand Down Expand Up @@ -138,8 +156,8 @@ class MakeRPMConfig extends MakeConfig {
'cp -r %{name}*.xml %{buildroot}%{_datadir}/metainfo || :',
'update-mime-database %{_datadir}/mime &> /dev/null || :',
].join('\n'),
'%postun': ['update-mime-database %{_datadir}/mime &> /dev/null || :']
.join('\n'),
'%post': postScripts.join('\n'),
'%postun': postunScripts.join('\n'),
'%files': [
'%{_bindir}/%{name}',
'%{_datadir}/%{name}',
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_app_packager/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_app_packager
description: Package your Flutter app into OS-specific bundles (.dmg, .exe, etc.) via Dart or the command line.
version: 0.6.5
version: 0.6.6
homepage: https://github.com/fastforgedev/fastforge

environment:
Expand Down