Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Mock Turtle
Commits
f0a42f39
Commit
f0a42f39
authored
May 06, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dist: produce RPM for libraries
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
674a4f94
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
100 additions
and
13 deletions
+100
-13
Makefile
distribution/Makefile
+25
-13
mockturtle-lib-static.spec
distribution/mockturtle-lib-static.spec
+37
-0
mockturtle-lib.spec
distribution/mockturtle-lib.spec
+38
-0
No files found.
distribution/Makefile
View file @
f0a42f39
...
...
@@ -7,7 +7,6 @@ DIR_NAME := $(DRIVER_NAME)-$(VERSION)
KEEP_TEMP
?=
n
BUILD
?=
$
(
abspath build
)
BUILD_DKMS
:=
$(BUILD)
/dkms
BUILD_TOOLS
:=
$(BUILD)
/tools
BUILD_DKMSSOURCE
:=
$(BUILD_DKMS)
/source
BUILD_DKMSTREE
:=
$(BUILD_DKMS)
/tree
...
...
@@ -17,11 +16,11 @@ SRC += $(TOP_DIR)/Makefile
DKMS_OPT
:=
--dkmstree
$(BUILD_DKMSTREE)
-m
$(DRIVER_NAME)
/
$(VERSION)
all
:
kernel
tools
all
:
kernel
userspace
kernel
:
dkms-tar dkms-rpm
tools
:
tools
-rpm
userspace
:
userspace
-rpm
clean
:
@
rm
-rf
$(BUILD)
...
...
@@ -62,18 +61,31 @@ dkms-tar: dkms-add
dkms-rpm
:
dkms-add
@
dkms mkrpm
$(DKMS_OPT)
--source-only
# Build Binary RPM package for
tool
s
tools
-dir
:
build-dir
@
mkdir
-p
$(BUILD
_TOOLS
)
/
{
BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS
}
# Build Binary RPM package for
librarie
s
userspace
-dir
:
build-dir
@
mkdir
-p
$(BUILD)
/
{
BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS
}
tools-spec
:
mockturtle-tools.spec tools-dir
@
cp
$<
$(BUILD_TOOLS)
/SPECS
userspace-spec
:
mockturtle-tools.spec mockturtle-lib.spec mockturtle-lib-static.spec userspace-dir
@
cp
mockturtle-tools.spec
$(BUILD)
/SPECS
@
cp
mockturtle-lib.spec
$(BUILD)
/SPECS
@
cp
mockturtle-lib-static.spec
$(BUILD)
/SPECS
tools-tar
:
tools-spec
spectool
-g
-C
$(BUILD_TOOLS)
/SOURCES
--define
"gittag
$(VERSION)
"
$(BUILD_TOOLS)
/SPECS/mockturtle-tools.spec
userspace-tar
:
userspace-spec
spectool
-g
-C
$(BUILD)
/SOURCES
--define
"gittag
$(VERSION)
"
$(BUILD)
/SPECS/mockturtle-tools.spec
spectool
-g
-C
$(BUILD)
/SOURCES
--define
"gittag
$(VERSION)
"
$(BUILD)
/SPECS/mockturtle-lib.spec
spectool
-g
-C
$(BUILD)
/SOURCES
--define
"gittag
$(VERSION)
"
$(BUILD)
/SPECS/mockturtle-lib-static.spec
tools-rpm
:
tools-tar
rpmbuild
-vv
--define
"%_topdir
$(BUILD_TOOLS)
"
--define
"arch
$(
shell
uname -p
)
"
--define
"gittag
$(VERSION)
"
-ba
$(BUILD_TOOLS)
/SPECS/mockturtle-tools.spec
RPMBUILD_DEFINE
:=
--define
"%_topdir
$(BUILD)
"
--define
"arch
$(
shell
uname -p
)
"
--define
"gittag
$(VERSION)
"
userspace-rpm
:
tools-rpm lib-static-rpm lib-rpm
.PHONY
:
dkmstree dkms-add kernel-dkms-tar tools-dir tools-spec tools-tar tools-rpm
tools-rpm
:
userspace-tar
rpmbuild
-vv
$(RPMBUILD_DEFINE)
-ba
$(BUILD)
/SPECS/mockturtle-tools.spec
lib-static-rpm
:
userspace-tar
rpmbuild
-vv
$(RPMBUILD_DEFINE)
-ba
$(BUILD)
/SPECS/mockturtle-lib-static.spec
lib-rpm
:
userspace-tar
rpmbuild
-vv
$(RPMBUILD_DEFINE)
-ba
$(BUILD)
/SPECS/mockturtle-lib.spec
.PHONY
:
dkmstree dkms-add kernel-dkms-tar userspace-dir userspace-spec userspace-tar userspace-rpm tools-rpm lib-static-rpm lib-rpm
distribution/mockturtle-lib-static.spec
0 → 100644
View file @
f0a42f39
%{?!gittag: %{error: You did not specify a version}}
%{?!arch: %{error: You did not specify an architecture}}
%global project_name mock-turtle
Summary: Static library to access Mock Turtle
Name: mockturtle-lib-static
Version: %{gittag}
License: GPL-3.0-or-later
Release: 1%{?dist}
Group: Applications/System
URL: https://ohwr.org/project/%{name}
BuildArch: %{arch}
Requires: mockturtle-driver
Source0: https://ohwr.org/project/%{project_name}/-/archive/%{gittag}/%{project_name}-%{gittag}.tar.bz2
%description
This package the Mock Turtle static library to access Mock Turtle instances on FPGA
%prep
%autosetup -n %{project_name}-%{gittag}
%build
make -C software/lib EXTRACFLAGS="$RPM_OPT_FLAGS"
%install
make -C software/lib DESTLIBDIR=%{buildroot}/%{_libdir}/ install
rm -f %{buildroot}/%{_libdir}/*.so*
%files
%license LICENSES/GPL-3.0-or-later.txt
%{_libdir}/libmockturtle.a
%changelog
# Nothing for the time being
distribution/mockturtle-lib.spec
0 → 100644
View file @
f0a42f39
%{?!gittag: %{error: You did not specify a version}}
%{?!arch: %{error: You did not specify an architecture}}
%global project_name mock-turtle
Summary: Library to access Mock Turtle
Name: mockturtle-lib
Version: %{gittag}
License: GPL-3.0-or-later
Release: 1%{?dist}
Group: Applications/System
URL: https://ohwr.org/project/%{name}
BuildArch: %{arch}
Requires: mockturtle-driver
Source0: https://ohwr.org/project/%{project_name}/-/archive/%{gittag}/%{project_name}-%{gittag}.tar.bz2
%description
This package the Mock Turtle library to access Mock Turtle instances on FPGA
%prep
%autosetup -n %{project_name}-%{gittag}
%build
make -C software/lib EXTRACFLAGS="$RPM_OPT_FLAGS"
%install
make -C software/lib DESTLIBDIR=%{buildroot}/%{_libdir}/ install
rm -f %{buildroot}/%{_libdir}/*.a
%files
%license LICENSES/GPL-3.0-or-later.txt
%{_libdir}/libmockturtle.so
%{_libdir}/libmockturtle.so.*
%changelog
# Nothing for the time being
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment