summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorWonYoung Choi <wy80.choi@samsung.com>2016-12-19 18:47:19 +0900
committerWonYoung Choi <wy80.choi@samsung.com>2016-12-19 20:58:27 +0900
commit8994c6cb67c5badb66755d82b78564d9fe3044f1 (patch)
tree62ec79d48739be1133b85c8f97e15e3bae984b5d /packaging
parent15b1479b837ef0e558bcb870679c0ae322a127ac (diff)
downloadelm-sharp-8994c6cb67c5badb66755d82b78564d9fe3044f1.tar.gz
elm-sharp-8994c6cb67c5badb66755d82b78564d9fe3044f1.tar.bz2
elm-sharp-8994c6cb67c5badb66755d82b78564d9fe3044f1.zip
Apply dotnet RPM macros
Change-Id: Icd1c12d0b16e67c6767a4cbee63aa458db8c1332 Signed-off-by: WonYoung Choi <wy80.choi@samsung.com>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/elm-sharp.spec52
1 files changed, 10 insertions, 42 deletions
diff --git a/packaging/elm-sharp.spec b/packaging/elm-sharp.spec
index 4ff9645..078d9fd 100644
--- a/packaging/elm-sharp.spec
+++ b/packaging/elm-sharp.spec
@@ -1,11 +1,3 @@
-%{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework}
-
-%if 0%{?tizen_build_devel_mode}
-%define BUILDCONF Debug
-%else
-%define BUILDCONF Release
-%endif
-
%define DEV_VERSION beta-002
Name: elm-sharp
@@ -21,29 +13,24 @@ Source1: %{name}.manifest
AutoReqProv: no
ExcludeArch: aarch64 %ix86
-BuildRequires: mono-compiler
-BuildRequires: mono-devel
-
BuildRequires: dotnet-build-tools
BuildRequires: edje-tools
+%define Assemblies ElmSharp
+
%description
-C# Binding for Elementary
+%{summary}
+
+%dotnet_import_sub_packages
%prep
%setup -q
cp %{SOURCE1} .
-%define Assemblies ElmSharp
-
%build
for ASM in %{Assemblies}; do
-# NuGet Restore
-find $ASM/*.project.json -exec nuget restore {} \;
-# Build
-find $ASM/*.csproj -exec xbuild {} /p:Configuration=%{BUILDCONF} \;
-# NuGet Pack
-nuget pack $ASM/$ASM.nuspec -Version %{version}%{?DEV_VERSION:-%{DEV_VERSION}} -Properties Configuration=%{BUILDCONF}
+%dotnet_build $ASM
+%dotnet_pack $ASM/$ASM.nuspec %{version}%{?DEV_VERSION:-%{DEV_VERSION}}
done
edje_cc -id ElmSharp/theme/%{profile}/HD/images/ \
@@ -51,34 +38,15 @@ edje_cc -id ElmSharp/theme/%{profile}/HD/images/ \
ElmSharp/theme/%{profile}/elm-sharp-theme-%{profile}.edc ElmSharp/theme/elm-sharp-theme.edj
%install
-# Runtime Binary
-mkdir -p %{buildroot}%{dotnet_assembly_path}
for ASM in %{Assemblies}; do
-%if 0%{?_with_corefx}
- install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
-%else
- install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
-%endif
+%dotnet_install $ASM
done
-# NuGet
-mkdir -p %{buildroot}/nuget
-install -p -m 644 *.nupkg %{buildroot}/nuget
-# Theme
+
mkdir %{buildroot}%{_datadir}/edje/elm-sharp -p
install -m 644 ElmSharp/theme/elm-sharp-theme.edj %{buildroot}%{_datadir}/edje/elm-sharp/
%files
%manifest %{name}.manifest
%license LICENSE
-%attr(644,root,root) %{dotnet_assembly_path}/*.dll
+%attr(644,root,root) %{dotnet_assembly_files}
%attr(644,root,root) %{_datadir}/edje/elm-sharp/*.edj
-
-%package nuget
-Summary: NuGet package for %{name}
-Group: Development/Libraries
-
-%description nuget
-NuGet package for %{name}
-
-%files nuget
-/nuget/*.nupkg