[CommonError] Add common errors and utility functions
authorSidharth Gupta <sid92.gupta@samsung.com>
Mon, 14 Mar 2016 08:56:08 +0000 (17:56 +0900)
committerSidharth Gupta <sid92.gupta@samsung.com>
Thu, 17 Mar 2016 09:04:00 +0000 (18:04 +0900)
- Currently error enum and methods are public. Should
  be made private
- Also changed entire Tizen namespace project from
  .NET 4.5.2 to 4.5

Signed-off-by: Sidharth Gupta <sid92.gupta@samsung.com>
Change-Id: I421969d59e95be5d648cb31c1d5d866aa6d74fe3

Makefile [new file with mode: 0644]
Tizen.Internals/Interop/Interop.CommonError.cs [new file with mode: 0755]
Tizen.Internals/Properties/AssemblyInfo.cs [new file with mode: 0755]
Tizen.Internals/Tizen.Internals.Errors/ErrorCode.cs [new file with mode: 0755]
Tizen.Internals/Tizen.Internals.Errors/ErrorFacts.cs [new file with mode: 0755]
Tizen.Internals/Tizen.Internals.csproj [new file with mode: 0755]
Tizen.Internals/Tizen.Internals.snk [new file with mode: 0755]
Tizen.sln
Tizen/Tizen.csproj
packaging/csapi-tizen.pc.in
packaging/csapi-tizen.spec

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..b2312e5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+ASM_DIRS := Tizen Tizen.Internals
+ASM_DLLS := $(addsuffix .dll,$(ASM_DIRS))
+
+ALL: $(ASM_DLLS)
+
+define make-dll
+$(eval SRC = $(shell find $1 -path $1/obj -prune -o -name '*.cs' -print))
+$1.dll: $(SRC)
+       @echo "[BUILD] $$@"
+       @mcs /nologo /out:$$@ /t:library /keyfile:$1/$1.snk $(SRC)
+       @echo "[CHECK] $$@"
+       @RET=`mono-shlib-cop $$@`; \
+  CNT=`echo $$$$RET | grep -e '^error:' | wc -l`; \
+  if [ $$$$CNT -gt 0 ]; then echo $$$$RET; rm -f $$@ exit 1; fi
+endef
+
+$(eval $(call make-dll,Tizen))
+$(eval $(call make-dll,Tizen.Internals))
+
+clean:
+       @rm -f $(ASM_DLLS)
diff --git a/Tizen.Internals/Interop/Interop.CommonError.cs b/Tizen.Internals/Interop/Interop.CommonError.cs
new file mode 100755 (executable)
index 0000000..3c55b54
--- /dev/null
@@ -0,0 +1,28 @@
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+    internal static partial class Libraries
+    {
+        public const string Base = "libcapi-base-common.so.0";
+    }
+
+    internal static partial class CommonError
+    {
+        [DllImport(Libraries.Base, EntryPoint = "get_last_result")]
+        internal static extern int GetLastResult();
+
+        [DllImport(Libraries.Base, EntryPoint = "get_error_message")]
+        internal static extern IntPtr GetErrorMessage(int errorCode);
+    }
+}
diff --git a/Tizen.Internals/Properties/AssemblyInfo.cs b/Tizen.Internals/Properties/AssemblyInfo.cs
new file mode 100755 (executable)
index 0000000..0fa808a
--- /dev/null
@@ -0,0 +1,18 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Tizen.Internals")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Samsung Electronics")]
+[assembly: AssemblyProduct("Tizen.Internals")]
+[assembly: AssemblyCopyright("Copyright (c) 2015 Samsung Electronics Co., Ltd")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+[assembly: ComVisible(false)]
+
+[assembly: Guid("b9aa1cb2-f72d-4a30-a33b-a20c850a38a0")]
+
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Tizen.Internals/Tizen.Internals.Errors/ErrorCode.cs b/Tizen.Internals/Tizen.Internals.Errors/ErrorCode.cs
new file mode 100755 (executable)
index 0000000..331f7e2
--- /dev/null
@@ -0,0 +1,115 @@
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+namespace Tizen.Internals.Errors
+{
+    public enum ErrorCode : int
+    {
+        None = 0, //  0, /**< Successful */
+        NotPermitted = -1, //  -EPERM, /**< Operation not permitted */
+        NoSuchFile = -2, //  -ENOENT, /**< No such file or directory */
+        NoSuchProcess = -3, //  -ESRCH, /**< No such process */
+        InterruptedSysCall = -4, //  -EINTR, /**< Interrupted system call */
+        IoError = -5, //  -EIO, /**< I/O error */
+        NoSuchDevice = -6, //  -ENXIO, /**< No such device or address */
+        ArgumentListTooLong = -7, //  -E2BIG, /**< Argument list too long */
+        ExecFormatError = -8, //  -ENOEXEC, /**< Exec format error */
+        BadFileNumber = -9, //  -EBADF, /**< Bad file number */
+        TryAgain = -11, //  -EAGAIN, /**< Try again */
+        OutOfMemory = -12, //  -ENOMEM, /**< Out of memory */
+        PermissionDenied = -13, //  -EACCES, /**< Permission denied */
+        BadAddress = -14, //  -EFAULT, /**< Bad address */
+        BlockDeviceRequired = -15, //  -ENOTBLK, /**< Block device required */
+        ResourceBusy = -16, //  -EBUSY, /**< Device or resource busy */
+        FileExists = -17, //  -EEXIST, /**< File exists */
+        CrossDeviceLink = -18, //  -EXDEV, /**< Cross-device link */
+        NotaDirectory = -20, //  -ENOTDIR, /**< Not a directory */
+        IsADirectory = -21, //  -EISDIR, /**< Is a directory */
+        InvalidParameter = -22, //  -EINVAL, /**< Invalid function parameter */
+        FileTableOverflow = -23, //  -ENFILE, /**< File table overflow */
+        TooManyOpenFiles = -24, //  -EMFILE, /**< Too many open files */
+        TooNotaTerminal = -25, //  -ENOTTY, /**< Not a terminal */
+        TooTextFileBusy = -26, //  -ETXTBSY, /**< Not a terminal */
+        FileTooLarge = -27, //  -EFBIG, /**< File too large */
+        FileNoSpaceOnDevice = -28, //  -ENOSPC, /**< No space left on device */
+        IllegalSeek = -29, //  -ESPIPE, /**< Illegal seek */
+        ReadOnlyFilesystem = -30, //  -EROFS, /**< Read-only file system */
+        NoData = -61, //  -ENODATA, /**< No data available */
+        TooManyLinks = -31, //  -EMLINK, /**< Too many links */
+        BrokenPipe = -32, //  -EPIPE, /**< Broken pipe */
+        ArgumentOutOfDomain = -33, //  -EDOM, /**< Math argument out of domain of func */
+        ResultOutOfRange = -34, //  -ERANGE, /**< Math result not representable */
+        WouldCauseDeadlock = -35, //  -EDEADLK, /**< Resource deadlock would occur */
+        FileNameTooLong = -36, //  -ENAMETOOLONG,/**< File name too long */
+        FileNoLocksAvailable = -37, //  -ENOLCK, /**< No record locks available */
+        InvalidOperation = -38, //  -ENOSYS, /**< Function not implemented */
+        DirNotEmpty = -39, //  -ENOTEMPTY, /**< Directory not empty */
+        TooManySymbolicLinks = -40, //  -ELOOP, /**< Too many symbolic links encountered */
+        WouldBlock = -11, //  TryAgain (-EAGAIN), /**< Operation would block */
+        CorruptedSharedLib = -80, //  -ELIBBAD, /**< Accessing a corrupted shared library */
+        LibSectionCorrupted = -81, //  -ELIBSCN, /**< .lib section in a.out corrupted */
+        LinkTooManySharedLib = -82, //  -ELIBMAX, /**< Attempting to link in too many shared libraries */
+        SharedLibExec = -83, //  -ELIBEXEC, /**< Cannot exec a shared library directly */
+        IllegalByteSeq = -84, //  -EILSEQ, /**< Illegal byte sequence */
+        SystemCallRestart = -85, //  -ERESTART, /**< Interrupted system call should be restarted */
+        StreamsPipe = -86, //  -ESTRPIPE, /**< Streams pipe error */
+        TooManyUsers = -87, //  -EUSERS, /**< Too many users */
+        NonSocket = -88, //  -ENOTSOCK, /**< Socket operation on non-socket */
+        NoDestAddress = -89, //  -EDESTADDRREQ, /**< Destination address required */
+        MsgTooLong = -90, //  -EMSGSIZE, /**< Message too long */
+        ProtocolWrongType = -91, //  -EPROTOTYPE, /**< Protocol wrong type for socket */
+        ProtocolNotAvaliable = -92, //  -ENOPROTOOPT, /**< Protocol not available */
+        ProtocolNotSupported = -93, //  -EPROTONOSUPPORT, /**< Protocol not supported */
+        SocketTypeNotSupported = -94, //  -ESOCKTNOSUPPORT, /**< Socket type not supported */
+        EndpointOperatinNotSupported = -95, //  -EOPNOTSUPP, /**< Operation not supported on transport endpoint */
+        ProtocolFamilyNotSupported = -96, //  -EPFNOSUPPORT, /**< Protocol family not supported */
+        AddressFamilyNotSupported = -97, //  -EAFNOSUPPORT, /**< Address family not supported by protocol */
+        AddresInUse = -98, //  -EADDRINUSE, /**< Address already in use */
+        CannotAssignAddress = -99, //  -EADDRNOTAVAIL, /**< Cannot assign requested address */
+        Networkdown = -100, //  -ENETDOWN, /**< Network is down */
+        NetworkUnreachable = -101, //  -ENETUNREACH, /**< Network is unreachable */
+        NetworkReset = -102, //  -ENETRESET, /**< Network dropped connection because of reset */
+        ConnectionAborted = -103, //  -ECONNABORTED, /**< Software caused connection abort */
+        ConnectionResetByPeer = -104, //  -ECONNRESET, /**< Connection reset by peer */
+        BufferSpace = -105, //  -ENOBUFS, /**< No buffer space available */
+        EndpointConnected = -106, //  -EISCONN, /**< Transport endpoint is already connected */
+        EndpointNotConnected = -107, //  -ENOTCONN, /**< Transport endpoint is not connected */
+        EndpointShutdown = -108, //  -ESHUTDOWN, /**< Cannot send after transport endpoint shutdown */
+        TooManyReferences = -109, //  -ETOOMANYREFS, /**< Too many references: cannot splice */
+        ConnectionTimeout = -110, //  -ETIMEDOUT, /**< Connection timed out */
+        ConnectionRefused = -111, //  -ECONNREFUSED, /**< Connection refused */
+        Hostdown = -112, //  -EHOSTDOWN, /**< Host is down */
+        NoRouteToHost = -113, //  -EHOSTUNREACH, /**< No route to host */
+        AlreadyInProgress = -114, //  -EALREADY, /**< Operation already in progress */
+        NowInProgress = -115, //  -EINPROGRESS, /**< Operation now in progress */
+        StaleNfsFileHandle = -116, //  -ESTALE, /**< Stale NFS file handle */
+        StructureUnclean = -117, //  -EUCLEAN, /**< Structure needs cleaning */
+        NotXenixNamedTypeFile = -118, //  -ENOTNAM, /**< Not a XENIX named type file */
+        NoXenixSemaphoresAvailable = -119, //  -ENAVAIL, /**< No XENIX semaphores available */
+        IsNamedTypeFile = -120, //  -EISNAM, /**< Is a named type file */
+        RemoteIo = -121, //  -EREMOTEIO, /**< Remote I/O error */
+        QuotaExceeded = -122, //  -EDQUOT, /**< Quota exceeded */
+        NoMedium = -123, //  -ENOMEDIUM, /**< No medium found */
+        WrongMediumType = -124, //  -EMEDIUMTYPE, /**< Wrong medium type */
+        Canceled = -125, //  -ECANCELED, /**< Operation Canceled */
+        KeyNotAvailable = -126, //  -ENOKEY, /**< Required key not available */
+        KeyExpired = -127, //  -EKEYEXPIRED, /**< Key has expired */
+        KeyRevoked = -128, //  -EKEYREVOKED, /**< Key has been revoked */
+        KeyRejected = -129, //  -EKEYREJECTED, /**< Key was rejected by service */
+
+        OwnerDead = -130, //  -EOWNERDEAD, /**< Owner died (for robust mutexes) */
+
+        Unknown = -1073741824, //  TIZEN_ERROR_MIN_PLATFORM_ERROR, /**< Unknown error */
+
+        TimedOut,   // /**< Time out */
+        NotSupported, // /**< Not Supported */
+        UserNotConsented,//  /**< Not Consented */
+        EndofCollection  //
+    }
+}
diff --git a/Tizen.Internals/Tizen.Internals.Errors/ErrorFacts.cs b/Tizen.Internals/Tizen.Internals.Errors/ErrorFacts.cs
new file mode 100755 (executable)
index 0000000..4a09063
--- /dev/null
@@ -0,0 +1,40 @@
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace Tizen.Internals.Errors
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public static class ErrorFacts
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <returns></returns>
+        public static int GetLastResult()
+        {
+            return Interop.CommonError.GetLastResult();
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="errorCode"></param>
+        /// <returns></returns>
+        public static string GetErrorMessage(int errorCode)
+        {
+            IntPtr errorPtr = Interop.CommonError.GetErrorMessage(errorCode);
+            return Marshal.PtrToStringAuto(errorPtr);
+        }
+    }
+}
diff --git a/Tizen.Internals/Tizen.Internals.csproj b/Tizen.Internals/Tizen.Internals.csproj
new file mode 100755 (executable)
index 0000000..d4119c6
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Tizen.Internals</RootNamespace>
+    <AssemblyName>Tizen.Internals</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>Tizen.Internals.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Interop\Interop.CommonError.cs" />
+    <Compile Include="Tizen.Internals.Errors\ErrorFacts.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Tizen.Internals.Errors\ErrorCode.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Tizen.Internals.snk" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
diff --git a/Tizen.Internals/Tizen.Internals.snk b/Tizen.Internals/Tizen.Internals.snk
new file mode 100755 (executable)
index 0000000..0fcdde4
Binary files /dev/null and b/Tizen.Internals/Tizen.Internals.snk differ
index 3ef5a12..a3af06a 100755 (executable)
--- a/Tizen.sln
+++ b/Tizen.sln
@@ -5,6 +5,8 @@ VisualStudioVersion = 14.0.24720.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen", "Tizen\Tizen.csproj", "{7659CA59-410D-41A1-9841-586E88BC78C9}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.Internals", "Tizen.Internals\Tizen.Internals.csproj", "{B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
                {7659CA59-410D-41A1-9841-586E88BC78C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {7659CA59-410D-41A1-9841-586E88BC78C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {7659CA59-410D-41A1-9841-586E88BC78C9}.Release|Any CPU.Build.0 = Release|Any CPU
+               {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index cc3e3ff..1083135 100755 (executable)
@@ -9,8 +9,9 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Tizen</RootNamespace>
     <AssemblyName>Tizen</AssemblyName>
-    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
index e0b220a..e8cb460 100644 (file)
@@ -1,5 +1,5 @@
 Name: csapi-tizen
 Description: Tizen API for C#
 Version: @version@
-Libs: -r:@dllpath@/@dllname@
-Requires:
\ No newline at end of file
+Libs: -r:@dllpath@/Tizen.dll,@dllpath@/Tizen.Internals.dll
+Requires:
index 19ebe13..f0765f5 100644 (file)
@@ -1,5 +1,4 @@
 %define dllpath %{_libdir}/mono/tizen
-%define dllname Tizen.dll
 
 Name:       csapi-tizen
 Summary:    Tizen API for C#
@@ -12,22 +11,16 @@ Source0:    %{name}-%{version}.tar.gz
 Source1:    %{name}.manifest
 Source2:    %{name}.pc.in
 
-# TODO: replace mono-compiler, mono-devel to mcs, mono-shlib-cop
 BuildRequires: mono-compiler
 BuildRequires: mono-devel
-# TODO: replace mono-core to gacutil.
-#       mono-core should provide the symbol 'gacutil'
-Requires(post): mono-core
-Requires(postun): mono-core
-
-# P/Invoke Dependencies
 BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(capi-base-common)
 
-# P/Invoke Runtime Dependencies
-# TODO: It should be removed after fix tizen-rpm-config
 Requires: dlog
-# DLL Dependencies
-#BuildRequires: ...
+Requires: capi-base-common
+
+Requires(post): mono-core
+Requires(postun): mono-core
 
 %description
 Tizen API for C#
@@ -46,36 +39,27 @@ Development package for %{name}
 cp %{SOURCE1} .
 
 %build
-# build dll
-mcs -target:library -out:%{dllname} -keyfile:Tizen/Tizen.snk \
-  Tizen/Properties/AssemblyInfo.cs \
-  Tizen/Tizen/*.cs \
-  Tizen/Interop/*.cs
-
-# check p/invoke
-if [ -x %{dllname} ]; then
-  RET=`mono-shlib-cop %{dllname}`; \
-  CNT=`echo $RET | grep -E "^error:" | wc -l`; \
-  if [ $CNT -gt 0 ]; then exit 1; fi
-fi
+make
 
 %install
 # copy dll
 mkdir -p %{buildroot}%{dllpath}
-install -p -m 644 %{dllname} %{buildroot}%{dllpath}
+install -p -m 644 Tizen.dll %{buildroot}%{dllpath}
+install -p -m 644 Tizen.Internals.dll %{buildroot}%{dllpath}
 
 # generate pkgconfig
 mkdir -p %{buildroot}%{_libdir}/pkgconfig
 sed -e "s#@version@#%{version}#g" \
     -e "s#@dllpath@#%{dllpath}#g" \
-    -e "s#@dllname@#%{dllname}#g" \
     %{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
 
 %post
-gacutil -i %{dllpath}/%{dllname}
+gacutil -i %{dllpath}/Tizen.dll
+gacutil -i %{dllpath}/Tizen.Internals.dll
 
 %files
-%{dllpath}/%{dllname}
+%{dllpath}/Tizen.dll
+%{dllpath}/Tizen.Internals.dll
 
 %files devel
 %{_libdir}/pkgconfig/%{name}.pc