Commit d8025b1e authored by Nobuhiro Iwamatsu's avatar Nobuhiro Iwamatsu

Add debian directory

Signed-off-by: Nobuhiro Iwamatsu's avatarNobuhiro Iwamatsu <iwamatsu@debian.org>
parent 8a7d4030
libubootenv (0.1-1) unstable; urgency=low
* Initial release. (Closes: #929047)
-- Nobuhiro Iwamatsu <iwamatsu@debian.org> Tue, 16 Apr 2019 09:48:44 +0900
Source: libubootenv
Priority: optional
Maintainer: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Uploaders: SZ Lin (林上智) <szlin@debian.org>
Build-Depends: debhelper (>= 11), cmake, zlib1g-dev, graphviz, doxygen
Standards-Version: 4.3.0
Section: utils
Homepage: https://github.com/sbabic/libubootenv
Vcs-Browser: https://salsa.debian.org/debian/libubootenv
Vcs-Git: https://salsa.debian.org/debian/libubootenv.git
Package: libubootenv-dev
Section: libdevel
Architecture: any
Depends: libubootenv0.1 (= ${binary:Version}), ${misc:Depends}
Suggests: libubootenv-doc
Multi-Arch: same
Description: Library to access U-Boot environment - development files
libubootenv is a library that provides a hardware independent way to access
to U-Boot environment. U-Boot has its default environment compiled
board-dependently and this means that tools to access the environment are also
board specific, too.
.
This package contains files that are needed to build applications.
Package: libubootenv0.1
Section: libs
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Multi-Arch: same
Description: Library to access U-Boot environment - runtime
libubootenv is a library that provides a hardware independent way to access
to U-Boot environment. U-Boot has its default environment compiled
board-dependently and this means that tools to access the environment are also
board specific, too.
.
This package includes the shared library.
Package: libubootenv-tool
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}, libubootenv0.1 (= ${binary:Version})
Multi-Arch: foreign
Description: Library to access U-Boot environment - tool
libubootenv is a library that provides a hardware independent way to access
to U-Boot environment. U-Boot has its default environment compiled
board-dependently and this means that tools to access the environment are also
board specific, too.
.
This package contains files that is tool using libubootenv.
Package: libubootenv-doc
Architecture: all
Section: doc
Depends: ${misc:Depends}
Multi-Arch: foreign
Description: Library to access U-Boot environment - document
libubootenv is a library that provides a hardware independent way to access
to U-Boot environment. U-Boot has its default environment compiled
board-dependently and this means that tools to access the environment are also
board specific, too.
.
This package contains documentation for the libubootenv library.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: libubootenv
Source: https://github.com/sbabic/libubootenv
Files: *
Copyright: Stefano Babic <sbabic@denx.de>
License: LGPL-2.1+
Files: debian/*
Copyright: 2019 Nobuhiro Iwamatsu <iwamatsu@debian.org>
License: LGPL-2.1+
License: LGPL-2.1+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1, or (at your option)
any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
.
On Debian systems, the complete text of the GNU Lesser General Public License
version 2.1 can be found in /usr/share/common-licenses/LGPL-2.1.
[DEFAULT]
upstream-branch = upstream
debian-branch = master
upstream-tag = v%(version)s
compression = xz
usr/include/*
usr/lib/*/lib*.a
usr/lib/*/lib*.so
*/doc_doxygen/html usr/share/doc/libubootenv-doc/
From 2968afc0969ce2f809065b69fe0ce14885eed1f3 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Date: Tue, 16 Apr 2019 08:49:07 +0900
Subject: [PATCH 1/4] Unifies the functionality provided by CMake to lowercase
This unify to lowercase, because CMake's functions are mixed lowercase and
uppercase.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
---
CMakeLists.txt | 2 +-
src/CMakeLists.txt | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 118fc32..2b61b91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@ project (libubootenv C)
# set (libubootenv_VERSION_MAJOR 1)
# set (libubootenv_VERSION_MAJOR_VERSION_MINOR 0)
set(VERSION "0.1")
-SET(SOVERSION "${VERSION}")
+set(SOVERSION "${VERSION}")
add_definitions(-DVERSION="${VERSION}")
#set(CMAKE_C_FLAGS_DEBUG "-g")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 051732b..ea5979c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,19 +1,19 @@
cmake_minimum_required (VERSION 2.6)
# Sources and private headers
-SET(libubootenv_SOURCES
+set(libubootenv_SOURCES
uboot_env.c
uboot_private.h
)
# Public headers
-SET(include_HEADERS
+set(include_HEADERS
libuboot.h
)
add_library(ubootenv SHARED ${libubootenv_SOURCES} ${include_HEADERS})
-SET_TARGET_PROPERTIES(ubootenv PROPERTIES SOVERSION ${SOVERSION})
+set_target_properties(ubootenv PROPERTIES SOVERSION ${SOVERSION})
-ADD_LIBRARY(ubootenv_static STATIC ${libubootenv_SOURCES} ${include_HEADERS})
+add_library(ubootenv_static STATIC ${libubootenv_SOURCES} ${include_HEADERS})
add_executable(fw_printenv fw_printenv.c)
add_executable(fw_setenv fw_setenv.c)
target_link_libraries(fw_printenv ubootenv z)
--
2.20.1
From 14b6a4e279155ba0cb018eb1c56e4bec86f3f729 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Date: Tue, 16 Apr 2019 08:52:01 +0900
Subject: [PATCH 2/4] Add support GNUInstallDirs
This adds the functionality of the module "GNUInstallDirs" to make the
installation compatible with GNU.
https://cmake.org/cmake/help/v3.14/module/GNUInstallDirs.html
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
CMakeLists.txt | 2 ++
src/CMakeLists.txt | 8 ++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2b61b91..dabccc7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,8 @@ set(VERSION "0.1")
set(SOVERSION "${VERSION}")
add_definitions(-DVERSION="${VERSION}")
+include("GNUInstallDirs")
+
#set(CMAKE_C_FLAGS_DEBUG "-g")
include_directories ("${PROJECT_SOURCE_DIR}/src")
add_subdirectory (src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ea5979c..d97f221 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -19,7 +19,7 @@ add_executable(fw_setenv fw_setenv.c)
target_link_libraries(fw_printenv ubootenv z)
target_link_libraries(fw_setenv ubootenv z)
-install (TARGETS ubootenv DESTINATION lib)
-install (FILES libuboot.h DESTINATION include)
-install (TARGETS fw_printenv DESTINATION bin)
-install (TARGETS fw_setenv DESTINATION bin)
+install (TARGETS ubootenv DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+install (FILES libuboot.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+install (TARGETS fw_printenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
+install (TARGETS fw_setenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
--
2.20.1
From d42398c4a45b40decdfa3cff0af3b9cc1b0c5aed Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Date: Tue, 16 Apr 2019 08:54:14 +0900
Subject: [PATCH 3/4] Change name of the output static library to libubootenv.a
This changes of the output static library from libubootenv_static.a to
libubootenv.a.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
src/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d97f221..b136967 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,6 +14,10 @@ add_library(ubootenv SHARED ${libubootenv_SOURCES} ${include_HEADERS})
set_target_properties(ubootenv PROPERTIES SOVERSION ${SOVERSION})
add_library(ubootenv_static STATIC ${libubootenv_SOURCES} ${include_HEADERS})
+set_target_properties(ubootenv_static PROPERTIES
+ SOVERSION ${SOVERSION} ARCHIVE_OUTPUT_NAME ubootenv
+)
+
add_executable(fw_printenv fw_printenv.c)
add_executable(fw_setenv fw_setenv.c)
target_link_libraries(fw_printenv ubootenv z)
--
2.20.1
From 7ed1734e4be278879e4d86ea0802da3883db0ca9 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Date: Tue, 16 Apr 2019 08:55:51 +0900
Subject: [PATCH 4/4] Add the static library for installation
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
src/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b136967..79efed8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -24,6 +24,7 @@ target_link_libraries(fw_printenv ubootenv z)
target_link_libraries(fw_setenv ubootenv z)
install (TARGETS ubootenv DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+install (TARGETS ubootenv_static DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install (FILES libuboot.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install (TARGETS fw_printenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
install (TARGETS fw_setenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
--
2.20.1
0001-Unifies-the-functionality-provided-by-CMake-to-lower.patch
0002-Add-support-GNUInstallDirs.patch
0003-Change-name-of-the-output-static-library-to-libuboot.patch
0004-Add-the-static-library-for-installation.patch
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CMAKE_FLAGS = \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_C_FLAGS_RELEASE="$(CFLAGS)" \
-DCMAKE_EXE_LINKER_FLAGS_RELEASE="$(LDFLAGS)" \
-DBUILD_DOCS=ON
%:
dh $@
override_dh_auto_configure:
dh_auto_configure \
-- $(CMAKE_FLAGS) \
-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$(LDFLAGS)"
version=3
opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/libubootenv-$1.tar.gz/,dversionmangle=s/\+dfsg// \
https://github.com/sbabic/libubootenv .*/v?(\d\S*)\.tar\.gz
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment