[Title] make hello project's name changeable, create rpm spec file for agent project
authoryoonki.park <yoonki.park@samsung.com>
Tue, 27 Mar 2012 01:11:33 +0000 (10:11 +0900)
committeryoonki.park <yoonki.park@samsung.com>
Tue, 27 Mar 2012 05:42:10 +0000 (14:42 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#] 4778
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: Ibaed946b2c5cc26d899c1dce4ccce8bc01c2dd5b

org.tizen.nativeplatform/templates/InhouseFrameworkPackages/AgentProject/CMakeLists.txt
org.tizen.nativeplatform/templates/InhouseFrameworkPackages/AgentProject/debian/changelog
org.tizen.nativeplatform/templates/InhouseFrameworkPackages/AgentProject/debian/control
org.tizen.nativeplatform/templates/InhouseFrameworkPackages/AgentProject/debian/rules
org.tizen.nativeplatform/templates/InhouseFrameworkPackages/AgentProject/packaging/agent.spec [new file with mode: 0644]
org.tizen.nativeplatform/templates/InhouseFrameworkPackages/AgentProject/template.xml
org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/changelog
org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/control
org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/rules
org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/packaging/hello.spec
org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/template.xml

index 82dee25..f2f4b28 100644 (file)
@@ -68,5 +68,5 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/com.samsung.${PROJECT_NAME}.desktop.i
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/com.samsung.${PROJECT_NAME}.desktop DESTINATION /opt/share/applications)
 
 INSTALL(DIRECTORY DESTINATION ${DATADIR})
-
-
+INSTALL(DIRECTORY DESTINATION ${LIBDIR})
+INSTALL(DIRECTORY DESTINATION ${RESDIR})
\ No newline at end of file
index f2b8c34..8feee67 100644 (file)
@@ -2,4 +2,4 @@ $(projectName) (0.0.0-1) unstable; urgency=low
 
   * initial release
 
- -- Author <E-mail>  Thu, 26 Jan 2012 14:52:56 +0900
+ -- $(author) <$(e-mail)>  Thu, 26 Jan 2012 14:52:56 +0900
index 97155db..9795dd1 100644 (file)
@@ -1,16 +1,16 @@
 Source: $(projectName)
 Priority: extra
-Maintainer: Author <E-mail>
+Maintainer: $(author) <$(e-mail)>
 Build-Depends: debhelper (>= 5), libappcore-agent-dev, dlog-dev
 Standards-Version: 0.1.0
 
 Package: com.samsung.$(projectName)
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: agent application
+Description: $(description)
 
 Package: com.samsung.$(projectName)-dbg
 Section: debug
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: agent application (unstripped)
+Description: agent application (unstripped)
\ No newline at end of file
index 39a3e43..390480a 100644 (file)
@@ -32,12 +32,8 @@ configure-stamp:
        dh_testdir
        # Add here commands to configure the package.
        CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DVERSION=$(VERSION)
-
-
-
        touch configure-stamp
 
-
 build: build-stamp
 
 build-stamp: configure-stamp
@@ -88,9 +84,6 @@ clean:
 
        dh_clean
 
-
-
-
 install: build
        dh_testdir
        dh_testroot
@@ -100,7 +93,6 @@ install: build
        # Add here commands to install the package into debian/info-alarm.
        $(MAKE) DESTDIR=$(CURDIR)/debian/com.samsung.$(projectName) install
 
-
 # Build architecture-independent files here.
 binary-indep: build install
 # We have nothing to do by default.
@@ -137,4 +129,4 @@ binary-arch: build install
        dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install configure
\ No newline at end of file
diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/AgentProject/packaging/agent.spec b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/AgentProject/packaging/agent.spec
new file mode 100644 (file)
index 0000000..0c470bb
--- /dev/null
@@ -0,0 +1,49 @@
+Name: com.samsung.$(projectName)
+Version: 0.1.0
+Release: 1
+License: To be filled
+Summary: agent application
+Packager: $(author) <$(e-mail)>
+Group: Application
+Source: %{name}-%{version}.tar.gz
+
+BuildRequires: cmake
+BuildRequires: pkgconfig(appcore-agent)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+$(description)
+
+%define PREFIX "/opt/apps/com.samsung.$(projectName)"
+%define RESDIR "/opt/apps/com.samsung.$(projectName)/res"
+
+%prep
+%setup -q
+
+%build
+export LDFLAGS="${LDFLAGS} -Wl,--rpath,/usr/lib -Wl,--rpath,%{PREFIX}/lib -Wl,--hash-style=both -Wl,--as-needed"
+export CFLAGS="${CFLAGS} -fPIC"
+export CXXFLAGS="${CXXFLAGS} -fPIC"
+cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DVERSION=%{Version}
+# Call make instruction with smp support
+make %{?jobs:-j%jobs}
+touch configure-stamp
+
+%install
+%make_install
+
+%clean
+rm -f build-stamp configure-stamp
+
+%files
+%defattr(644, app, app)
+%attr(755, app, app) /opt/apps/%{name}/bin
+/opt/apps/%{name}/lib
+/opt/apps/%{name}/data
+/opt/apps/%{name}/res/
+/opt/share/applications
+
+%changelog
+* Thu Jan 26 2012 $(author) <$(e-mail)>
+ - initial release
\ No newline at end of file
index 5b99152..bd3ac14 100644 (file)
                        hidden="false"
                        persist="false"/>
        </property-group>
-       
+
        <process type="org.tizen.nativecommon.TizenCreateSourceFolder">
                <simple name="projectName" value="$(projectName)"/>
                <simple name="path" value="src"/>
        </process>
-       
+
        <process type="org.eclipse.cdt.core.AddFiles">
                <simple name="projectName" value="$(projectName)"/>
                <complex-array name="files">
                                <simple name="target" value="include/$(projectName).h"/>
                                <simple name="replaceable" value="true"/>
                        </element>
-            <element>
-                               <simple name="source" value="src/agent.c"/>
-                               <simple name="target" value="src/$(projectName).c"/>
-                               <simple name="replaceable" value="true"/>
+                       <element>
+                               <simple name="source" value="src/agent.c" />
+                               <simple name="target" value="src/$(projectName).c" />
+                               <simple name="replaceable" value="true" />
                        </element>
                        <element>
                                <simple name="source" value="debian/rules"/>
@@ -93,7 +93,7 @@
                                <simple name="source" value="debian/changelog"/>
                                <simple name="target" value="debian/changelog"/>
                                <simple name="replaceable" value="true"/>
-                       </element>      
+                       </element>
                        <element>
                                <simple name="source" value="debian/com.samsung.agent.install"/>
                                <simple name="target" value="debian/com.samsung.$(projectName).install"/>
                                <simple name="target" value="debian/postinst"/>
                                <simple name="replaceable" value="true"/>
                        </element>
+                       <element>
+                               <simple name="source" value="packaging/agent.spec" />
+                               <simple name="target" value="packaging/$(projectName).spec" />
+                               <simple name="replaceable" value="true" />
+                       </element>
                </complex-array>
        </process>
 
        <process type="org.tizen.nativecommon.SetSBITarget">
                <simple name="projectName" value="$(projectName)"/>
        </process>
-       
-       
+
+
 </template>
index 8db3a56..99516aa 100644 (file)
@@ -1,5 +1,5 @@
-com.samsung.hello (1.0.0) unstable; urgency=low
+$(projectName) (0.0.0-1) unstable; urgency=low
 
-  *  Initial Release
+  * initial release
 
- -- Author <E-mail>  Fri, 22 Jul 2011 17:32:27 +0900
\ No newline at end of file
+ -- $(author) <$(e-mail)>  Sat, 24 Mar 2012 17:32:27 +0900
\ No newline at end of file
index 05ebaa0..2a60cb3 100644 (file)
@@ -2,12 +2,10 @@
 #    THIS FILE IS CREATED AUTOMATICALLY. DO NOT DELETE OR MODIFY THIS FILE.
 #################################################################################
 
-Source: com.samsung.hello
-Maintainer: Author <E-mail>
-Standards-Version: 1.0.0
+Source: com.samsung.$(projectName)
+Maintainer: $(author) <$(e-mail)>
+Standards-Version: 0.0.1
 
-Package: com.samsung.hello
-description: none
-Architecture: any
-XB-Permission: 
-XB-RequiredHardware: 
+Package: com.samsung.$(projectName)
+description: $(description)
+Architecture: any
\ No newline at end of file
index 88e033a..5590a02 100644 (file)
@@ -11,30 +11,30 @@ configure-stamp:
        dh_testdir
        # Add here commands to configure the package.
        touch configure-stamp
-       
+
 build: build-stamp
 build-stamp: configure-stamp
        dh_testdir
        # Add here commands to build the package.
        mkdir -p bin
-       $(CC) $(CFLAGS) $(LDFLAGS) src/hello.c -o bin/hello
+       $(CC) $(CFLAGS) $(LDFLAGS) src/$(projectName).c -o bin/$(projectName)
        touch build-stamp
-       
-clean: 
+
+clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp
        # Add here commands to clean up before the build process.
        dh_clean
-       
+
 install: build
        dh_testdir
        dh_testroot
-       dh_clean -k 
+       dh_clean -k
        dh_installdirs
        # Add here commands to install the package.
        mkdir -p debian/tmp/usr/bin
-       cp bin/hello debian/tmp/usr/bin/
+       cp bin/$(projectName) debian/tmp/usr/bin/
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -43,12 +43,12 @@ binary-indep: build install
 binary-arch: build install
        dh_testdir
        dh_testroot
-       dh_installchangelogs 
+       dh_installchangelogs
        dh_installdocs
        dh_installexamples
        dh_install --sourcedir=debian/tmp
 #   dh_installmenu
-#   dh_installdebconf   
+#   dh_installdebconf
 #   dh_installlogrotate
 #   dh_installemacsen
 #   dh_installpam
@@ -59,12 +59,12 @@ binary-arch: build install
 #   dh_installinfo
        dh_installman
        dh_link
-       dh_strip
+#      dh_strip
        dh_compress
        dh_fixperms
 #   dh_perl
        dh_makeshlibs
-       dh_installdeb 
+       dh_installdeb
 #   dh_shlibdeps
        dh_gencontrol
        dh_md5sums
index 4b7c5f7..95e5905 100644 (file)
@@ -1,26 +1,26 @@
-Name: com.samsung.hello
-Version: 1.0.0
+Name: com.samsung.$(projectName)
+Version: 0.0.1
 Release: 1
 License: To be filled
-Summary: Your copyright notice
-Packager: bluleo78 <bluleo78@bluleo78-desktop>
+Summary: helloworld application (unstripped)
+Packager: $(author) <$(e-mail)>
 Group: Application
 Source: %{name}-%{version}.tar.gz
 %description
-Your copyright notice
+$(description)
 
 %prep
 %setup -q
 
 %build
 mkdir -p bin
-gcc src/hello.c -o bin/hello
+gcc src/$(projectName).c -o bin/$(projectName)
 touch build-stamp
 
 %install
 echo "INSTALL"
 mkdir -p $RPM_BUILD_ROOT/usr/bin
-cp bin/hello $RPM_BUILD_ROOT/usr/bin
+cp bin/$(projectName) $RPM_BUILD_ROOT/usr/bin
 
 %clean
 rm -f build-stamp configure-stamp
@@ -30,5 +30,5 @@ rm -f build-stamp configure-stamp
 %attr(755, root, root) /usr/bin
 
 %changelog
-* Sat Mar 24 2012 bluleo78 <bluleo78@bluleo78-desktop>
- - Initial Release
+* Sat Mar 24 2012 Author <E-mail>
+ - initial release
\ No newline at end of file
index 6244d56..cfb24e0 100644 (file)
                        hidden="false"
                        persist="false"/>
        </property-group>
-       
+
        <process type="org.tizen.nativecommon.TizenCreateSourceFolder">
                <simple name="projectName" value="$(projectName)"/>
                <simple name="path" value="src"/>
        </process>
-       
+
        <process type="org.eclipse.cdt.core.AddFiles">
                <simple name="projectName" value="$(projectName)"/>
                <complex-array name="files">
                        <element>
                                <simple name="source" value="src/hello.c"/>
-                               <simple name="target" value="src/hello.c"/>
+                               <simple name="target" value="src/$(projectName).c"/>
                                <simple name="replaceable" value="true"/>
                        </element>
                        <element>
                                <simple name="source" value="debian/changelog"/>
                                <simple name="target" value="debian/changelog"/>
                                <simple name="replaceable" value="true"/>
-                       </element>      
+                       </element>
                        <element>
                                <simple name="source" value="debian/com.samsung.hello.install"/>
-                               <simple name="target" value="debian/com.samsung.hello.install"/>
+                               <simple name="target" value="debian/com.samsung.$(projectName).install"/>
                                <simple name="replaceable" value="true"/>
                        </element>
                        <element>
@@ -95,6 +95,6 @@
        <process type="org.tizen.nativecommon.SetSBITarget">
                <simple name="projectName" value="$(projectName)"/>
        </process>
-       
-       
+
+
 </template>