Skip to content

Commit

Permalink
Use make as a build system for opam files.
Browse files Browse the repository at this point in the history
There are now two opam files:
- unison.opam is the main opam file. It has an optional dependency to
  lablgtk3, so that the GUI is built only if the lablgtk3 package is installed.
- unison-gui.opam is a pseudo-package, with both unison and lablgtk3 as
  dependencies. It can be used to force the GUI to be installed.

As a side effect, remove the package information from the dune-project files,
to avoid redundancy.
  • Loading branch information
jhjourdan committed Dec 14, 2022
1 parent eab2353 commit 64d8434
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 77 deletions.
71 changes: 0 additions & 71 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,4 @@

(name unison)

(version dev)

(generate_opam_files false)

(license GPL-3.0-or-later)

(maintainers "unison-hackers@lists.seas.upenn.edu")

(authors "Trevor Jim" "Benjamin C. Pierce" "J\195\169r\195\180me Vouillon")

(source
(github bcpierce00/unison))

(homepage https://www.cis.upenn.edu/~bcpierce/unison/)

(documentation "https://github.com/bcpierce00/unison/wiki")

(package
(name unison)
(synopsis "File-synchronization tool for Unix and Windows")
(description "\
Text based user interface for Unison.
Unison is a file-synchronization tool for Unix and Windows.
It allows two replicas of a collection of files and directories
to be stored on different hosts (or different disks on the same host),
modified separately, and then brought up to date by propagating
the changes in each replica to the other.
")
(depends
(ocaml
(>= 4.08))
(dune
(>= 2.3))))

(package
(name unison-gui)
(synopsis "File-synchronization tool for Unix and Windows")
(description "\
Graphical user interface for Unison.
Unison is a file-synchronization tool for Unix and Windows.
It allows two replicas of a collection of files and directories
to be stored on different hosts (or different disks on the same host),
modified separately, and then brought up to date by propagating
the changes in each replica to the other.
")
(depends
(ocaml
(>= 4.08))
(dune
(>= 2.3))
lablgtk))

(package
(name unison-fsmonitor)
(synopsis "File-synchronization tool for Unix and Windows")
(description "\
This optional add-on for unison monitors file system changes
on all given (relative to root) paths.
Unison is a file-synchronization tool for Unix and Windows.
It allows two replicas of a collection of files and directories
to be stored on different hosts (or different disks on the same host),
modified separately, and then brought up to date by propagating
the changes in each replica to the other.
")
(depends
(ocaml
(>= 4.08))
(dune
(>= 2.3))))
4 changes: 2 additions & 2 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
(executable
(name linktext)
(public_name unison)
(package unison)
(package unison) ; Dummy: we don't use packages
(modules linktext)
(libraries unison_lib))

(executable
(name linkgtk3)
(public_name unison-gui)
(package unison-gui)
(package unison-gui) ; Dummy: we don't use packages
(flags :standard -w -3-6-9-27-32-52)
(modules linkgtk3 uigtk3)
(libraries threads unison_lib lablgtk3))
2 changes: 1 addition & 1 deletion src/fsmonitor/linux/dune
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
(executable
(name watcher)
(public_name unison-fsmonitor)
(package unison-fsmonitor)
(package unison) ; Dummy: we don't use packages
(enabled_if
(or
(= %{system} "linux")
Expand Down
2 changes: 1 addition & 1 deletion src/fsmonitor/solaris/dune
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
(executable
(name watcher)
(public_name unison-fsmonitor)
(package unison-fsmonitor)
(package unison) ; Dummy: we don't use packages
(enabled_if (= %{system} "solaris"))
(modules watcher)
(flags :standard -w -27)
Expand Down
22 changes: 22 additions & 0 deletions unison-gui.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
opam-version: "2.0"
maintainer: "unison-hackers@lists.seas.upenn.edu"
authors: [
"Trevor Jim"
"Benjamin C. Pierce"
"Jérôme Vouillon"
]
license: "GPL-3.0-or-later"
homepage: "https://www.cis.upenn.edu/~bcpierce/unison/"
bug-reports: "https://github.com/bcpierce00/unison/issues"
dev-repo: "git://github.com/bcpierce00/unison.git"
depends: [
"unison" {= version}
"lablgtk3"
]
synopsis: "Pseudo-package for Unison GUI"
description: """
Unison is a file-synchronization tool for Unix and Windows. It allows
two replicas of a collection of files and directories to be stored on
different hosts (or different disks on the same host), modified
separately, and then brought up to date by propagating the changes in
each replica to the other."""
6 changes: 4 additions & 2 deletions unison.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ license: "GPL-3.0-or-later"
homepage: "https://www.cis.upenn.edu/~bcpierce/unison/"
bug-reports: "https://github.com/bcpierce00/unison/issues"
dev-repo: "git://github.com/bcpierce00/unison.git"
build: ["dune" "build" "-p" name "-j" jobs]
build: [make "-j" jobs]
install: [make "INSTALLDIR=%{bin}%/" "install"]
depends: [
"ocaml" {>= "4.08"}
"dune" {>= "2.3"}
]
depopts: [
"lablgtk3" {>= "3.1.0"}
]
synopsis: "File-synchronization tool for Unix and Windows"
Expand Down

0 comments on commit 64d8434

Please sign in to comment.